Class JsonFileLogDriver.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<JsonFileLogDriver>
- Enclosing class:
- JsonFileLogDriver
JsonFileLogDriver
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Toggles compression for rotated logs.static JsonFileLogDriver.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.The maximum number of log files that can be present.The maximum size of the log before it is rolled.By default, Docker uses the first 12 characters of the container ID to tag log messages.
-
Method Details
-
create
- Returns:
- a new instance of
JsonFileLogDriver.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
-
compress
Toggles compression for rotated logs.Default: - false
- Parameters:
compress
- Toggles compression for rotated logs. This parameter is required.- Returns:
this
-
maxFile
The maximum number of log files that can be present.If rolling the logs creates excess files, the oldest file is removed. Only effective when max-size is also set. A positive integer.
Default: - 1
- Parameters:
maxFile
- The maximum number of log files that can be present. This parameter is required.- Returns:
this
-
maxSize
The maximum size of the log before it is rolled.A positive integer plus a modifier representing the unit of measure (k, m, or g).
Default: - -1 (unlimited)
- Parameters:
maxSize
- The maximum size of the log before it is rolled. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<JsonFileLogDriver>
- Returns:
- a newly built instance of
JsonFileLogDriver
.
-