class GenericLogDriver
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.GenericLogDriver |
Java | software.amazon.awscdk.services.ecs.GenericLogDriver |
Python | aws_cdk.aws_ecs.GenericLogDriver |
TypeScript (source) | @aws-cdk/aws-ecs » GenericLogDriver |
Extends
Log
A log driver that sends logs to the specified driver.
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: new ecs.GenericLogDriver({
logDriver: 'fluentd',
options: {
tag: 'example-tag',
},
}),
});
Initializer
new GenericLogDriver(props: GenericLogDriverProps)
Parameters
- props
Generic
— the generic log driver configuration options.Log Driver Props
Constructs a new instance of the GenericLogDriver class.
Methods
Name | Description |
---|---|
bind(_scope, _containerDefinition) | Called when the log driver is configured on a container. |
bind(_scope, _containerDefinition)
public bind(_scope: Construct, _containerDefinition: ContainerDefinition): LogDriverConfig
Parameters
- _scope
Construct
- _containerDefinition
Container
Definition
Returns
Called when the log driver is configured on a container.