Class GelfLogDriver.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GelfLogDriver>
- Enclosing class:
- GelfLogDriver
GelfLogDriver
.-
Method Summary
Modifier and TypeMethodDescriptionThe address of the GELF server.build()
compressionLevel
(Number compressionLevel) UDP Only The level of compression when gzip or zlib is the gelf-compression-type.compressionType
(GelfCompressionType compressionType) UDP Only The type of compression the GELF driver uses to compress each log message.static GelfLogDriver.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.By default, Docker uses the first 12 characters of the container ID to tag log messages.tcpMaxReconnect
(Number tcpMaxReconnect) TCP Only The maximum number of reconnection attempts when the connection drop.tcpReconnectDelay
(Duration tcpReconnectDelay) TCP Only The number of seconds to wait between reconnection attempts.
-
Method Details
-
create
- Returns:
- a new instance of
GelfLogDriver.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
The address of the GELF server.tcp and udp are the only supported URI specifier and you must specify the port.
- Parameters:
address
- The address of the GELF server. This parameter is required.- Returns:
this
-
compressionLevel
UDP Only The level of compression when gzip or zlib is the gelf-compression-type.An integer in the range of -1 to 9 (BestCompression). Higher levels provide more compression at lower speed. Either -1 or 0 disables compression.
Default: - 1
- Parameters:
compressionLevel
- UDP Only The level of compression when gzip or zlib is the gelf-compression-type. This parameter is required.- Returns:
this
-
compressionType
@Stability(Stable) public GelfLogDriver.Builder compressionType(GelfCompressionType compressionType) UDP Only The type of compression the GELF driver uses to compress each log message.Allowed values are gzip, zlib and none.
Default: - gzip
- Parameters:
compressionType
- UDP Only The type of compression the GELF driver uses to compress each log message. This parameter is required.- Returns:
this
-
tcpMaxReconnect
TCP Only The maximum number of reconnection attempts when the connection drop.A positive integer.
Default: - 3
- Parameters:
tcpMaxReconnect
- TCP Only The maximum number of reconnection attempts when the connection drop. This parameter is required.- Returns:
this
-
tcpReconnectDelay
TCP Only The number of seconds to wait between reconnection attempts.A positive integer.
Default: - 1
- Parameters:
tcpReconnectDelay
- TCP Only The number of seconds to wait between reconnection attempts. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GelfLogDriver>
- Returns:
- a newly built instance of
GelfLogDriver
.
-