interface FireLensLogDriverProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.FireLensLogDriverProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#FireLensLogDriverProps |
![]() | software.amazon.awscdk.services.ecs.FireLensLogDriverProps |
![]() | aws_cdk.aws_ecs.FireLensLogDriverProps |
![]() | aws-cdk-lib » aws_ecs » FireLensLogDriverProps |
Specifies the firelens log driver configuration options.
Example
// Create a Task Definition for the container to start
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
taskDefinition.addContainer('TheContainer', {
image: ecs.ContainerImage.fromRegistry('example-image'),
memoryLimitMiB: 256,
logging: ecs.LogDrivers.firelens({
options: {
Name: 'firehose',
region: 'us-west-2',
delivery_stream: 'my-stream',
},
}),
});
Properties
Name | Type | Description |
---|---|---|
env? | string[] | The env option takes an array of keys. |
env | string | The env-regex option is similar to and compatible with env. |
labels? | string[] | The labels option takes an array of keys. |
options? | { [string]: string } | The configuration options to send to the log driver. |
secret | { [string]: Secret } | The secrets to pass to the log configuration. |
tag? | string | By default, Docker uses the first 12 characters of the container ID to tag log messages. |
env?
Type:
string[]
(optional, default: No 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.
envRegex?
Type:
string
(optional, default: No envRegex)
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.
labels?
Type:
string[]
(optional, default: No 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.
options?
Type:
{ [string]: string }
(optional, default: the log driver options)
The configuration options to send to the log driver.
secretOptions?
Type:
{ [string]:
Secret
}
(optional, default: No secret options provided.)
The secrets to pass to the log configuration.
tag?
Type:
string
(optional, default: The first 12 characters of the container ID)
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.