The Bundler has its own internal logging system (you can find its log
at {bundler-data-dir}/data/logs/bundler-{major-version}.log
),
but, as a bonus, the logging functionality has been exposed for workflow authors.
The Bundlers will log to STDERR
in the console so that you can
provide information and debug more easily. Output to STDERR
will
appear in the Alfred workflow debugger, and it will not interfere with script
filter XML.
There is also a file log available to you. Some bundlers initialize the log
regardless. For others, you have to initialize it when you load the Bundler.
By default, the log is at {workflow-data-dir}/{workflow-bundle-id}.log
.
Some of the Bundlers let you customize this, and others do not.
Each logger includes a stack trace, which will let you know the file and line the log message comes from.
The console logs include the time in HH:MM:SS
format. And the file
logs include the date in YY-MM-DD HH:MM:SS
format.
File logs are automatically rotated at 1 MB
, and one previous log
is kept.
Throughout the Bundler, there are five log levels.
Log levels can be called either by number or the string.
These levels are simply informative, so a CRITICAL level will not halt the execution of your script or throw an error. You must code that in manually. The Ruby bundler allows you to set a minimum log level that will appear.
INFO
; and if you try to use an invalid log level, then the Bundler will send an error
message to the console and set the log level to INFO
.
Post on the Alfred Forum thread.
Open an issue in the Github queue.