Class AwsLogDriver.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AwsLogDriver>
- Enclosing class:
AwsLogDriver
AwsLogDriver
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static AwsLogDriver.Builder
create()
datetimeFormat
(String datetimeFormat) This option defines a multiline start pattern in Python strftime format.The log group to log to.logRetention
(RetentionDays logRetention) The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct.maxBufferSize
(Size maxBufferSize) When AwsLogDriverMode.NON_BLOCKING is configured, this parameter controls the size of the non-blocking buffer used to temporarily store messages.mode
(AwsLogDriverMode mode) The delivery mode of log messages from the container to awslogs.multilinePattern
(String multilinePattern) This option defines a multiline start pattern using a regular expression.streamPrefix
(String streamPrefix) Prefix for the log streams.
-
Method Details
-
create
- Returns:
- a new instance of
AwsLogDriver.Builder
.
-
streamPrefix
Prefix for the log streams.The awslogs-stream-prefix option allows you to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task to which the container belongs. If you specify a prefix with this option, then the log stream takes the following format:
prefix-name/container-name/ecs-task-id
- Parameters:
streamPrefix
- Prefix for the log streams. This parameter is required.- Returns:
this
-
datetimeFormat
This option defines a multiline start pattern in Python strftime format.A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. Thus the matched line is the delimiter between log messages.
Default: - No multiline matching.
- Parameters:
datetimeFormat
- This option defines a multiline start pattern in Python strftime format. This parameter is required.- Returns:
this
-
logGroup
The log group to log to.Default: - A log group is automatically created.
- Parameters:
logGroup
- The log group to log to. This parameter is required.- Returns:
this
-
logRetention
The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct.Default: - Logs never expire.
- Parameters:
logRetention
- The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct. This parameter is required.- Returns:
this
-
maxBufferSize
When AwsLogDriverMode.NON_BLOCKING is configured, this parameter controls the size of the non-blocking buffer used to temporarily store messages. This parameter is not valid with AwsLogDriverMode.BLOCKING.Default: - 1 megabyte if driver mode is non-blocking, otherwise this property is not set
- Parameters:
maxBufferSize
- When AwsLogDriverMode.NON_BLOCKING is configured, this parameter controls the size of the non-blocking buffer used to temporarily store messages. This parameter is not valid with AwsLogDriverMode.BLOCKING. This parameter is required.- Returns:
this
-
mode
The delivery mode of log messages from the container to awslogs.Default: - AwsLogDriverMode.BLOCKING
- Parameters:
mode
- The delivery mode of log messages from the container to awslogs. This parameter is required.- Returns:
this
-
multilinePattern
This option defines a multiline start pattern using a regular expression.A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. Thus the matched line is the delimiter between log messages.
This option is ignored if datetimeFormat is also configured.
Default: - No multiline matching.
- Parameters:
multilinePattern
- This option defines a multiline start pattern using a regular expression. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AwsLogDriver>
- Returns:
- a newly built instance of
AwsLogDriver
.
-