JsonFileLogDriverProps Struct
Specifies the json-file log driver configuration options.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const jsonFileLogDriverProps: ecs.JsonFileLogDriverProps = {
compress: false,
env: ['env'],
envRegex: 'envRegex',
labels: ['labels'],
maxFile: 123,
maxSize: 'maxSize',
tag: 'tag',
};
Properties
compressoptionalbooleancompressoptionalboolcompressoptionalBooleanCompressoptionalboolCompressoptional*bool= false#envoptionalstring[]envoptionaltyping.List[str]envoptionalList<String>Envoptionalstring[]Envoptional*[]*string#Default: No env
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.
envRegexoptionalstringenv_regexoptionalstrenvRegexoptionalStringEnvRegexoptionalstringEnvRegexoptional*string#Default: No envRegex
Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
labelsoptionalstring[]labelsoptionaltyping.List[str]labelsoptionalList<String>Labelsoptionalstring[]Labelsoptional*[]*string#Default: No labels
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.
maxFileoptionalnumbermax_fileoptionalint | floatmaxFileoptionalNumberMaxFileoptionaldoubleMaxFileoptional*float64= 1#If rolling the logs creates excess files, the oldest file is removed. Only effective when max-size is also set. A positive integer.
maxSizeoptionalstringmax_sizeoptionalstrmaxSizeoptionalStringMaxSizeoptionalstringMaxSizeoptional*string#Default: -1 (unlimited)
A positive integer plus a modifier representing the unit of measure (k, m, or g).
Default: The first 12 characters of the container ID
Refer to the log tag option documentation for customizing the log tag format.