Log

Using the log object, you can can configure your Alfred UI to log to a file, the console, or the debugger in the Alfred Workflow editor.

{
  "log": {
    "path": "~/Desktop/auidebug.log",
    "colourful": true,
    "timestamp": true,
    "level": "all",
    "internal": true
  }
}

Properties

path
STRING
Optional

The path to the log file location. If you use a relative path, this will be written to the AlfredUI shared logs folder.

level
ENUM
Default: "none"

The increasing level of the logging to view.

Value Description
"none" No logging.
"error" Only log error items.
"warning" Log warning and errror items.
"info" Log info, warning and error items.
"debug" Log debug, info, warning and error items.
"verbose" Log verbose, debug, info, warning and error items.
"all" Log everything.
timestamp
BOOL
Default: false

Prefix log entries with a timestamp, useful for timings.

colourful
BOOL
Default: false

Use ansi colour codes to better highlight the log.

Note

Colourful logging is only used for written log files, and is useful when tailing the log file in Terminal.

console
BOOL
Default: false

Log to the macOS console.

internal
BOOL
Default: false

Log to the Alfred workflow debugger.

Only works if this UI is run within Alfred.