JsonFileLogDriverProps¶
-
class
aws_cdk.aws_ecs.
JsonFileLogDriverProps
(*, env=None, env_regex=None, labels=None, tag=None, compress=None, max_file=None, max_size=None)¶ Bases:
aws_cdk.aws_ecs.BaseLogDriverProps
Specifies the json-file log driver configuration options.
- Parameters
env (
Optional
[List
[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 envenv_regex (
Optional
[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 envRegexlabels (
Optional
[List
[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 labelstag (
Optional
[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 IDcompress (
Optional
[bool
]) – Toggles compression for rotated logs. Default: - falsemax_file (
Union
[int
,float
,None
]) – 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: - 1max_size (
Optional
[str
]) – 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)
Attributes
-
compress
¶ Toggles compression for rotated logs.
- Default
false
- Return type
Optional
[bool
]
-
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
- Return type
Optional
[List
[str
]]
-
env_regex
¶ 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
- Return type
Optional
[str
]
-
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
- Return type
Optional
[List
[str
]]
-
max_file
¶ 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
- Return type
Union
[int
,float
,None
]
-
max_size
¶ 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)
- Return type
Optional
[str
]
-
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
- Return type
Optional
[str
]