<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Automator",
  "identifier" : "/documentation/Automator/AMAction/logMessageWithLevel:format:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automator"
    ],
    "preciseIdentifier" : "c:objc(cs)AMAction(im)logMessageWithLevel:format:"
  },
  "title" : "logMessageWithLevel:format:"
}
-->

# logMessageWithLevel:format:

Displays a message in Automator’s log area.

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

## Parameters

`level`

The level of logging to perform. See [`AMLogLevel`](/documentation/Automator/AMLogLevel) for possible values.

`format`

A format string. See [Formatting String Objects](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 [String Format Specifiers](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFStrings/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265) for a list of format specifiers.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)