---
title: "logMessageWithLevel:format:"
framework: Automator
role: symbol
role_heading: Instance Method
platforms: [Mac Catalyst 14.0+, macOS 10.7+]
path: "automator/amaction/logmessagewithlevel:format:"
---

# logMessageWithLevel:format:

Displays a message in Automator’s log area.

## Declaration

```occ
- (void) logMessageWithLevel:(AMLogLevel) level format:(NSString *) format;
```

## Parameters

- `level`: The level of logging to perform. See doc://com.apple.automator/documentation/Automator/AMLogLevel for possible values.
- `format`: A format string. See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Strings/Articles/FormatStrings.html#//apple_ref/doc/uid/20000943 for examples of how to use this method, and https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFStrings/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265 for a list of format specifiers.

## Discussion

Discussion This message is visible to the user. Use this method if you wish to provide feedback to the user in Automator’s log area as your action runs.

## See Also

### Performing Logging

- [AMLogLevel](automator/amloglevel.md)
