Skip to content
v2.278.0

FluentdLogDriverProps Struct ​

Specifies the fluentd log driver configuration options.

Source

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 fluentdLogDriverProps: ecs.FluentdLogDriverProps = {
  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_props = ecs.FluentdLogDriverProps(
    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.*;

FluentdLogDriverProps fluentdLogDriverProps = FluentdLogDriverProps.builder()
        .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 fluentdLogDriverProps = 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"

fluentdLogDriverProps := &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"),
}

Properties ​

addressoptionalstringaddressoptionalstraddressoptionalStringAddressoptionalstringAddressoptional*string #
By default, the logging driver connects to localhost:24224.

Default: address not set.

Supply the address option to connect to a different address. tcp(default) and unix sockets are supported.

asyncoptionalbooleanasyncoptionalboolasyncoptionalBooleanAsyncoptionalboolAsyncoptional*bool = false #
Docker connects to Fluentd in the background.

Messages are buffered until the connection is established.

asyncConnectoptionalbooleanasync_connectoptionalboolasyncConnectoptionalBooleanAsyncConnectoptionalboolAsyncConnectoptional*bool = false deprecated #
use `async` instead

Messages are buffered until the connection is established.

bufferLimitoptionalnumberbuffer_limitoptionalint | floatbufferLimitoptionalNumberBufferLimitoptionaldoubleBufferLimitoptional*float64 #
The amount of data to buffer before flushing to disk.

Default: The amount of RAM available to the container.

envoptionalstring[]envoptionaltyping.List[str]envoptionalList<String>Envoptionalstring[]Envoptional*[]*string #
The env option takes an array of keys.

Default: No env

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.

envRegexoptionalstringenv_regexoptionalstrenvRegexoptionalStringEnvRegexoptionalstringEnvRegexoptional*string #
The env-regex option is similar to and compatible with env.

Default: No envRegex

Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.

labelsoptionalstring[]labelsoptionaltyping.List[str]labelsoptionalList<String>Labelsoptionalstring[]Labelsoptional*[]*string #
The labels option takes an array of keys.

Default: No labels

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.

maxRetriesoptionalnumbermax_retriesoptionalint | floatmaxRetriesoptionalNumberMaxRetriesoptionaldoubleMaxRetriesoptional*float64 #
The maximum number of retries.

Default: 4294967295 (2**32 - 1).

retryWaitoptionalDurationretry_waitoptionalDurationretryWaitoptionalDurationRetryWaitoptionalDurationRetryWaitoptionalDuration #
How long to wait between retries.

Default: 1 second

subSecondPrecisionoptionalbooleansub_second_precisionoptionalboolsubSecondPrecisionoptionalBooleanSubSecondPrecisionoptionalboolSubSecondPrecisionoptional*bool = false #
Generates event logs in nanosecond resolution.
tagoptionalstringtagoptionalstrtagoptionalStringTagoptionalstringTagoptional*string #
By default, Docker uses the first 12 characters of the container ID to tag log messages.

Default: The first 12 characters of the container ID

Refer to the log tag option documentation for customizing the log tag format.