Log
This is the optional configuration section for structured event logs. It cannot be reloaded. If present, the root value described below must appear in the main configuration file.
Root Value
The root value may be a simple string naming the log driver, for example:
discard
Drop all logs. This is the default.
journal
Send logs directly to
journald.syslog
Send logs directly to
syslog.stdout
Write logs to standard output.
Added in version 0.3.5.
In this form, the selected driver becomes the default configuration for all loggers.
The root value may also be a map with the following keys:
default
optional, type: log config
Set the default log configuration for loggers without an explicit override.
default: discard
syslog
optional, type: syslog
Define the reusable
syslogdriver configuration.default: not set
Added in version 0.3.7.
fluentd
optional, type: fluentd
Define the reusable
fluentddriver configuration.default: not set
Added in version 0.3.7.
task
optional, type: log config
Set the log configuration for
taskloggers.default: not set
Log Config Value
Each detailed logger configuration may be a simple driver name or a map with the following keys:
journal
optional, type: map
Use the
journaldriver. The map is currently empty because no driver-specific keys are defined.syslog
optional, type: syslog
Use the
syslogdriver.fluentd
optional, type: fluentd
Use the
fluentddriver.async_channel_size
optional, type: usize
Set the internal async channel size.
default: 4096
async_thread_number
optional, type: usize
Set the number of asynchronous worker threads.
This has no effect on the
discardandjournaldrivers.default: 1
io_error_sampling_offset
optional, type: usize, max: 16
I/O errors can occur while writing logs. This setting controls sampling by logging one error out of every
2^noccurrences.This has no effect on the
discardandjournaldrivers.default: 10
Note
The discard driver has no configuration fields, so it does not
have a corresponding map entry.