Runtime Keys
The playbook keys configured under the runtime
key manage Antora’s logger, as well as its console output, caching, and remote repository update behavior.
runtime key
The global log, console output, fetch, and cache directory properties are defined under the runtime
key in a playbook file.
These settings are applied to the Antora pipeline when it starts.
runtime: (1)
cache_dir: ./.cache/antora (2)
fetch: true (3)
log: (4)
level: error (5)
quiet: true (6)
1 | Optional runtime key |
2 | Optional cache_dir key |
3 | Optional fetch key |
4 | Optional log key |
5 | Optional level key |
6 | Optional quiet key |
The runtime
key and the key-value pairs it accepts are optional.
If runtime
isn’t set in the playbook, Antora uses the default cache directory, fetch, and log settings.
Alternatively, these keys can be assigned from the CLI or, except for fetch
, using environment variables.
log key
The log
key is optional.
If you do set it in the playbook, you must nest it under the runtime key.
The log
key accepts a list of built-in key-value pairs that configure the log level (level
), failure level (failure_level
), and display format (format
).
runtime:
log: (1)
format: json (2)
failure_level: warn (3)
level: all (4)
level_format: number (5)
destination: (6)
file: ./antora.log (7)
append: true (8)
buffer_size: 4096 (9)
sync: false (10)
1 | The optional log category key is nested under the runtime category key. |
2 | The optional format key is nested under the log category key. |
3 | The optional failure_level key is nested under the log category key. |
4 | The optional level key is nested under the log category key. |
5 | The optional level_format key is nested under the log category key. |
6 | The optional destination category key is nested under the log category key. |
7 | The optional file key is nested under the destination category key. |
8 | The optional append key is nested under the destination category key. |
9 | The optional buffer_size key is nested under the destination category key. |
10 | The optional sync key is nested under the destination category key. |
If level
, failure_level
, format
, or level_format
are set in the playbook, they must be nested under the log
category key.
The level, failure_level, format, and level_format keys have default values that are automatically applied when Antora runs if they’re not explicitly defined in the playbook or using the corresponding the command line options or environment variables.
If file
, append
, buffer_size
, or sync
are set in the playbook, they must be nested under the destination
category key.
The log settings are not honored if a fatal error is thrown before Antora fully configures the playbook. In such cases, the error message is only printed directly to standard error (stderr) using a preconfigured logger. |
quiet key
The quiet
key is optional.
If you do set it in the playbook, you must nest it under the runtime key.
The quiet
key accepts a boolean value.
If the value is true, informational messages such as the git progress and build completion message are not written to stdout (i.e., the standard output stream) of the console.
In short, no messages are written directly stdout when this key is set to true.
runtime:
quiet: true (1)
1 | The optional quiet key is nested under the runtime category key. |
This flag does not impact messages written to stderr. Messages will still be written to the log, which may then be routed to stdout depending on the log configuration.
silent key
The silent
key is optional.
If you do set it in the playbook, you must nest it under the runtime key.
The silent
key accepts a boolean value.
If the value is true, the log level is set to silent
(and cannot be overridden) and any messages written directly to stdout and stderr are suppressed.
In short, all messages to the console and log are suppressed.
runtime:
silent: true (1)
1 | The optional silent key is nested under the runtime category key. |
You should not expect to see any messages in the console when the value of this key is true.
Available runtime keys
Runtime Keys | Description | Required |
---|---|---|
Specifies the directory where the remote content sources git repositories and UI bundles are cached. |
No |
|
When set to |
No |
|
Sets the log level tolerance that, when met or exceeded, causes Antora to fail on exit with a non-zero exit code.
Accepts the values |
No |
|
Sets the format of log messages.
Accepts the values |
No |
|
Sets the minimum severity threshold level that must be met for a message to be logged.
Accepts the values |
No |
|
Sets the format of how the log levels are expressed.
Only applies when |
No |
|
Sets the destination file or stream where log messages are written.
The default value (either |
No |
|
Configures whether to truncate (i.e., clear) the file before writing to it.
The default value is |
No |
|
Sets the amount of memory to use to buffer log messages.
Once the buffer reaches this size, the buffered messages are written to the destination in a batch.
The default value is |
No |
|
Configures whether to use a sync or async operation to write log messages to the destination.
The default value is |
No |
|
quiet |
Prevents any messages from being written to stdout.
The default value is |
No |
silent |
Suppresses all messages, including log messages (by forcefully setting the log level to silent).
The default value is |
No |