- class aws_cdk.aws_ecs.FluentdLogDriver(*, address=None, async_connect=None, buffer_limit=None, max_retries=None, retry_wait=None, sub_second_precision=None, env=None, env_regex=None, labels=None, tag=None)
A log driver that sends log information to journald Logs.
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ecs as ecs import aws_cdk.core as cdk fluentd_log_driver = ecs.FluentdLogDriver( address="address", async_connect=False, buffer_limit=123, env=["env"], env_regex="envRegex", labels=["labels"], max_retries=123, retry_wait=cdk.Duration.minutes(30), sub_second_precision=False, tag="tag" )
Constructs a new instance of the FluentdLogDriver class.
str]) – 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.
bool]) – Docker connects to Fluentd in the background. Messages are buffered until the connection is established. Default: - false
None]) – The amount of data to buffer before flushing to disk. Default: - The amount of RAM available to the container.
None]) – The maximum number of retries. Default: - 4294967295 (2**32 - 1).
Duration]) – How long to wait between retries. Default: - 1 second
bool]) – Generates event logs in nanosecond resolution. Default: - false
str]]) – 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
str]) – 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
str]]) – 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
str]) – 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
- bind(_scope, _container_definition)
Called when the log driver is configured on a container.
- Return type:
- classmethod aws_logs(*, stream_prefix, datetime_format=None, log_group=None, log_retention=None, mode=None, multiline_pattern=None)
Creates a log driver configuration that sends log information to CloudWatch Logs.
str) – 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
str]) – 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.
ILogGroup]) – The log group to log to. Default: - A log group is automatically created.
RetentionDays]) – 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.
AwsLogDriverMode]) – The delivery mode of log messages from the container to awslogs. Default: - AwsLogDriverMode.BLOCKING
str]) – 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.
- Return type: