Log Failure Level
failure_level key specifies the severity threshold that, when met or exceeded, causes Antora to exit with a non-zero (i.e., failure) exit code.
To be clear, this setting doesn’t stop Antora from running. Rather, it merely impacts the exit code value of the process in which Antora is running. It’s up to the shell to interpret this value, as most CI environments do.
Explicitly assigning a value to the
failure_level key is optional.
If it isn’t set in the playbook or specified using the --log-failure-level option or ANTORA_LOG_FAILURE_LEVEL variable, Antora assigns the value
fatal to the key at runtime.
If a logged message meets the
fatal severity threshold, Antora will exit with a non-zero exit code.
failure_level key is configured under the runtime and log keys in a playbook.
The key accepts the following built-in values:
These values correspond to the severity levels Antora assigns to log messages.
Except when the value is
none, Antora exits with a non-zero exit code if a message is logged that meets or exceeds the value assigned to
When the value is
none, Antora always exits with zero exit code, even when an unhandled error is thrown.
Note that when Antora’s logger is turned off, the
failure_level key and its value aren’t applied.
Let’s assign the value
warn to the
failure_level key in the playbook shown in Example 2.
Antora will finish generating the site, as long as it doesn’t encounter any fatal errors, and exit with a non-zero exit code if any messages are logged with a severity of
warn or greater.
If no warning, error, or fatal messages are logged, Antora exits with a zero (0) exit code.
That is, your site built successfully without any errors or potential problems!