public static final class AwsLogDriver.Builder
extends java.lang.Object
AwsLogDriver
.Modifier and Type | Method and Description |
---|---|
AwsLogDriver |
build() |
static AwsLogDriver.Builder |
create() |
AwsLogDriver.Builder |
datetimeFormat(java.lang.String datetimeFormat)
This option defines a multiline start pattern in Python strftime format.
|
AwsLogDriver.Builder |
logGroup(ILogGroup logGroup)
The log group to log to.
|
AwsLogDriver.Builder |
logRetention(RetentionDays logRetention)
The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct.
|
AwsLogDriver.Builder |
mode(AwsLogDriverMode mode)
The delivery mode of log messages from the container to awslogs.
|
AwsLogDriver.Builder |
multilinePattern(java.lang.String multilinePattern)
This option defines a multiline start pattern using a regular expression.
|
AwsLogDriver.Builder |
streamPrefix(java.lang.String streamPrefix)
Prefix for the log streams.
|
public static AwsLogDriver.Builder create()
AwsLogDriver.Builder
.public AwsLogDriver.Builder streamPrefix(java.lang.String streamPrefix)
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
streamPrefix
- Prefix for the log streams. This parameter is required.this
public AwsLogDriver.Builder datetimeFormat(java.lang.String datetimeFormat)
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.
datetimeFormat
- This option defines a multiline start pattern in Python strftime format. This parameter is required.this
public AwsLogDriver.Builder logGroup(ILogGroup logGroup)
Default: - A log group is automatically created.
logGroup
- The log group to log to. This parameter is required.this
public AwsLogDriver.Builder logRetention(RetentionDays logRetention)
Default: - Logs never expire.
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.this
public AwsLogDriver.Builder mode(AwsLogDriverMode mode)
Default: - AwsLogDriverMode.BLOCKING
mode
- The delivery mode of log messages from the container to awslogs. This parameter is required.this
public AwsLogDriver.Builder multilinePattern(java.lang.String multilinePattern)
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.
multilinePattern
- This option defines a multiline start pattern using a regular expression. This parameter is required.this
public AwsLogDriver build()