Class FluentdLogDriver.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FluentdLogDriver>
- Enclosing class:
FluentdLogDriver
FluentdLogDriver
.-
Method Summary
Modifier and TypeMethodDescriptionBy default, the logging driver connects to localhost:24224.asyncConnect
(Boolean asyncConnect) Docker connects to Fluentd in the background.bufferLimit
(Number bufferLimit) The amount of data to buffer before flushing to disk.build()
static FluentdLogDriver.Builder
create()
The env option takes an array of keys.The env-regex option is similar to and compatible with env.The labels option takes an array of keys.maxRetries
(Number maxRetries) The maximum number of retries.How long to wait between retries.subSecondPrecision
(Boolean subSecondPrecision) Generates event logs in nanosecond resolution.By default, Docker uses the first 12 characters of the container ID to tag log messages.
-
Method Details
-
create
- Returns:
- a new instance of
FluentdLogDriver.Builder
.
-
env
The env option takes an array of keys.If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
Default: - No env
- Parameters:
env
- The env option takes an array of keys. This parameter is required.- Returns:
this
-
envRegex
The env-regex option is similar to and compatible with env.Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
Default: - No envRegex
- Parameters:
envRegex
- The env-regex option is similar to and compatible with env. This parameter is required.- Returns:
this
-
labels
The labels option takes an array of keys.If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
Default: - No labels
- Parameters:
labels
- The labels option takes an array of keys. This parameter is required.- Returns:
this
-
tag
By default, Docker uses the first 12 characters of the container ID to tag log messages.Refer to the log tag option documentation for customizing the log tag format.
Default: - The first 12 characters of the container ID
- Parameters:
tag
- By default, Docker uses the first 12 characters of the container ID to tag log messages. This parameter is required.- Returns:
this
-
address
By default, the logging driver connects to localhost:24224.Supply the address option to connect to a different address. tcp(default) and unix sockets are supported.
Default: - address not set.
- Parameters:
address
- By default, the logging driver connects to localhost:24224. This parameter is required.- Returns:
this
-
asyncConnect
Docker connects to Fluentd in the background.Messages are buffered until the connection is established.
Default: - false
- Parameters:
asyncConnect
- Docker connects to Fluentd in the background. This parameter is required.- Returns:
this
-
bufferLimit
The amount of data to buffer before flushing to disk.Default: - The amount of RAM available to the container.
- Parameters:
bufferLimit
- The amount of data to buffer before flushing to disk. This parameter is required.- Returns:
this
-
maxRetries
The maximum number of retries.Default: - 4294967295 (2**32 - 1).
- Parameters:
maxRetries
- The maximum number of retries. This parameter is required.- Returns:
this
-
retryWait
How long to wait between retries.Default: - 1 second
- Parameters:
retryWait
- How long to wait between retries. This parameter is required.- Returns:
this
-
subSecondPrecision
Generates event logs in nanosecond resolution.Default: - false
- Parameters:
subSecondPrecision
- Generates event logs in nanosecond resolution. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FluentdLogDriver>
- Returns:
- a newly built instance of
FluentdLogDriver
.
-