Class LogDrivers
The base class for log drivers.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class LogDrivers : DeputyBase
Syntax (vb)
Public Class LogDrivers
Inherits DeputyBase
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 = LogDrivers.AwsLogs(new AwsLogDriverProps { StreamPrefix = "EventDemo" })
});
Synopsis
Constructors
LogDrivers() | |
LogDrivers(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LogDrivers(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
AwsLogs(IAwsLogDriverProps) | Creates a log driver configuration that sends log information to CloudWatch Logs. |
Firelens(IFireLensLogDriverProps) | Creates a log driver configuration that sends log information to firelens log router. |
Fluentd(IFluentdLogDriverProps) | Creates a log driver configuration that sends log information to fluentd Logs. |
Gelf(IGelfLogDriverProps) | Creates a log driver configuration that sends log information to gelf Logs. |
Journald(IJournaldLogDriverProps) | Creates a log driver configuration that sends log information to journald Logs. |
JsonFile(IJsonFileLogDriverProps) | Creates a log driver configuration that sends log information to json-file Logs. |
Splunk(ISplunkLogDriverProps) | Creates a log driver configuration that sends log information to splunk Logs. |
Syslog(ISyslogLogDriverProps) | Creates a log driver configuration that sends log information to syslog Logs. |
Constructors
LogDrivers()
public LogDrivers()
LogDrivers(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LogDrivers(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LogDrivers(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LogDrivers(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
AwsLogs(IAwsLogDriverProps)
Creates a log driver configuration that sends log information to CloudWatch Logs.
public static LogDriver AwsLogs(IAwsLogDriverProps props)
Parameters
- props IAwsLogDriverProps
Returns
Firelens(IFireLensLogDriverProps)
Creates a log driver configuration that sends log information to firelens log router.
public static LogDriver Firelens(IFireLensLogDriverProps props)
Parameters
- props IFireLensLogDriverProps
Returns
Remarks
For detail configurations, please refer to Amazon ECS FireLens Examples: https://github.com/aws-samples/amazon-ecs-firelens-examples
Fluentd(IFluentdLogDriverProps)
Creates a log driver configuration that sends log information to fluentd Logs.
public static LogDriver Fluentd(IFluentdLogDriverProps props = null)
Parameters
- props IFluentdLogDriverProps
Returns
Gelf(IGelfLogDriverProps)
Creates a log driver configuration that sends log information to gelf Logs.
public static LogDriver Gelf(IGelfLogDriverProps props)
Parameters
- props IGelfLogDriverProps
Returns
Journald(IJournaldLogDriverProps)
Creates a log driver configuration that sends log information to journald Logs.
public static LogDriver Journald(IJournaldLogDriverProps props = null)
Parameters
- props IJournaldLogDriverProps
Returns
JsonFile(IJsonFileLogDriverProps)
Creates a log driver configuration that sends log information to json-file Logs.
public static LogDriver JsonFile(IJsonFileLogDriverProps props = null)
Parameters
- props IJsonFileLogDriverProps
Returns
Splunk(ISplunkLogDriverProps)
Creates a log driver configuration that sends log information to splunk Logs.
public static LogDriver Splunk(ISplunkLogDriverProps props)
Parameters
- props ISplunkLogDriverProps
Returns
Syslog(ISyslogLogDriverProps)
Creates a log driver configuration that sends log information to syslog Logs.
public static LogDriver Syslog(ISyslogLogDriverProps props = null)
Parameters
- props ISyslogLogDriverProps
Returns