Log Severity Level
level key specifies a severity threshold, such as
error, that must be met for a message to be logged.
Explicitly assigning a value to the
level key is optional.
If it isn’t set in your playbook or specified using the --log-level option or ANTORA_LOG_LEVEL variable, Antora assigns the value
warn to the key at runtime.
When the default value is applied, all messages that meet or exceed the
warn threshold are logged.
level key is configured under the runtime and log keys in a playbook.
runtime: log: level: error
level key accepts the following built-in values:
Catastrophic errors that force Antora to shut down abruptly. Your site was not generated.
If a fatal error is thrown before Antora configures the playbook, Antora only prints the message to standard error (STERR). The error message isn’t routed through the logger as configured by the user.
Serious issues that indicate an important operation failed to occur or wasn’t completed successfully. An error may not cause Antora to shut down, but your site probably wasn’t generated or published as expected.
Default value. Incorrect AsciiDoc syntax such as missing AsciiDoc attributes, playbook or component configurations, and other problematic or unusual situations that are likely to affect the usability, performance, or appearance of the generated site.
Informational messages that highlight Antora’s normal operations and milestones.
Diagnostic messages that provide detailed context about Antora’s activities, events, warnings, and errors as they occurred. This level is useful when you need additional information about a warning or error.
All of the information and details about Antora’s operations and the results of those operations are logged.
The logger is turned off and no messages are logged.
Messages that meet or exceed the severity threshold are logged. Messages that don’t meet the severity threshold are not reported.
Let’s assign the value
info to the
level key in the playbook shown in Example 2.
runtime: (1) log: (2) level: info (3)
|1||In your playbook file, type the parent key
When Antora runs and
level is assigned
info, messages that meet or exceed the
info threshold are logged.
Messages that don’t meet the
info severity level aren’t reported.