Skip to content
v2.278.0

FluentdLogDriver Class ​

A log driver that sends log information to journald Logs.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ecs as ecs } from 'aws-cdk-lib';
const fluentdLogDriver = new ecs.FluentdLogDriver(/* all optional props */ {
  address: 'address',
  async: false,
  asyncConnect: false,
  bufferLimit: 123,
  env: ['env'],
  envRegex: 'envRegex',
  labels: ['labels'],
  maxRetries: 123,
  retryWait: cdk.Duration.minutes(30),
  subSecondPrecision: false,
  tag: 'tag',
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_ecs as ecs

fluentd_log_driver = ecs.FluentdLogDriver(
    address="address",
    async=False,
    async_connect=False,
    buffer_limit=123,
    env=["env"],
    env_regex="envRegex",
    labels=["labels"],
    max_retries=123,
    retry_wait=cdk.Duration.minutes(30),
    sub_second_precision=False,
    tag="tag"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ecs.*;

FluentdLogDriver fluentdLogDriver = FluentdLogDriver.Builder.create()
        .address("address")
        .async(false)
        .asyncConnect(false)
        .bufferLimit(123)
        .env(List.of("env"))
        .envRegex("envRegex")
        .labels(List.of("labels"))
        .maxRetries(123)
        .retryWait(Duration.minutes(30))
        .subSecondPrecision(false)
        .tag("tag")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.ECS;

var fluentdLogDriver = new FluentdLogDriver(new FluentdLogDriverProps {
    Address = "address",
    Async = false,
    AsyncConnect = false,
    BufferLimit = 123,
    Env = new [] { "env" },
    EnvRegex = "envRegex",
    Labels = new [] { "labels" },
    MaxRetries = 123,
    RetryWait = Duration.Minutes(30),
    SubSecondPrecision = false,
    Tag = "tag"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

fluentdLogDriver := awscdk.Aws_ecs.NewFluentdLogDriver(&FluentdLogDriverProps{
	Address: jsii.String("address"),
	Async: jsii.Boolean(false),
	AsyncConnect: jsii.Boolean(false),
	BufferLimit: jsii.Number(123),
	Env: []*string{
		jsii.String("env"),
	},
	EnvRegex: jsii.String("envRegex"),
	Labels: []*string{
		jsii.String("labels"),
	},
	MaxRetries: jsii.Number(123),
	RetryWait: cdk.Duration_Minutes(jsii.Number(30)),
	SubSecondPrecision: jsii.Boolean(false),
	Tag: jsii.String("tag"),
})

Initializer ​

ts
new FluentdLogDriver(props?: FluentdLogDriverProps)
python
FluentdLogDriver(props: typing.Optional[FluentdLogDriverProps] = None)
java
new FluentdLogDriver(FluentdLogDriverProps props)
csharp
new FluentdLogDriver(FluentdLogDriverProps? props = null)
go
NewFluentdLogDriver(Props FluentdLogDriverProps)

Methods ​

awsLogs(props: AwsLogDriverProps): LogDriver@staticmethod def aws_logs(props: AwsLogDriverProps) -> LogDriverpublic static LogDriver awsLogs(AwsLogDriverProps props)public static LogDriver AwsLogs(AwsLogDriverProps props)func AwsLogs(Props AwsLogDriverProps) LogDriver static #
Creates a log driver configuration that sends log information to CloudWatch Logs.
bind(_scope: Construct, _containerDefinition: ContainerDefinition): LogDriverConfigdef bind(self, _scope: Construct, _container_definition: ContainerDefinition) -> LogDriverConfigpublic LogDriverConfig bind(Construct _scope, ContainerDefinition _containerDefinition)public LogDriverConfig Bind(Construct _scope, ContainerDefinition _containerDefinition)func Bind(_scope Construct, _containerDefinition ContainerDefinition) LogDriverConfig #
Called when the log driver is configured on a container.