Class GenericLogDriver
A log driver that sends logs to the specified driver.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class GenericLogDriver : LogDriver
Syntax (vb)
Public Class GenericLogDriver
Inherits LogDriver
Remarks
ExampleMetadata: infused
Examples
// Create a Task Definition for the container to start
var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("example-image"),
MemoryLimitMiB = 256,
Logging = new GenericLogDriver(new GenericLogDriverProps {
LogDriver = "fluentd",
Options = new Dictionary<string, string> {
{ "tag", "example-tag" }
}
})
});
Synopsis
Constructors
GenericLogDriver(IGenericLogDriverProps) | Constructs a new instance of the GenericLogDriver class. |
GenericLogDriver(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
GenericLogDriver(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, ContainerDefinition) | Called when the log driver is configured on a container. |
Constructors
GenericLogDriver(IGenericLogDriverProps)
Constructs a new instance of the GenericLogDriver class.
public GenericLogDriver(IGenericLogDriverProps props)
Parameters
- props IGenericLogDriverProps
the generic log driver configuration options.
GenericLogDriver(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected GenericLogDriver(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
GenericLogDriver(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected GenericLogDriver(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, ContainerDefinition)
Called when the log driver is configured on a container.
public override ILogDriverConfig Bind(Construct scope, ContainerDefinition containerDefinition)
Parameters
- scope Construct
- containerDefinition ContainerDefinition
Returns