GelfLogDriver 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 gelfLogDriver = new ecs.GelfLogDriver({
address: 'address',
// the properties below are optional
compressionLevel: 123,
compressionType: ecs.GelfCompressionType.GZIP,
env: ['env'],
envRegex: 'envRegex',
labels: ['labels'],
tag: 'tag',
tcpMaxReconnect: 123,
tcpReconnectDelay: cdk.Duration.minutes(30),
});
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
gelf_log_driver = ecs.GelfLogDriver(
address="address",
# the properties below are optional
compression_level=123,
compression_type=ecs.GelfCompressionType.GZIP,
env=["env"],
env_regex="envRegex",
labels=["labels"],
tag="tag",
tcp_max_reconnect=123,
tcp_reconnect_delay=cdk.Duration.minutes(30)
)
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.*;
GelfLogDriver gelfLogDriver = GelfLogDriver.Builder.create()
.address("address")
// the properties below are optional
.compressionLevel(123)
.compressionType(GelfCompressionType.GZIP)
.env(List.of("env"))
.envRegex("envRegex")
.labels(List.of("labels"))
.tag("tag")
.tcpMaxReconnect(123)
.tcpReconnectDelay(Duration.minutes(30))
.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 gelfLogDriver = new GelfLogDriver(new GelfLogDriverProps {
Address = "address",
// the properties below are optional
CompressionLevel = 123,
CompressionType = GelfCompressionType.GZIP,
Env = new [] { "env" },
EnvRegex = "envRegex",
Labels = new [] { "labels" },
Tag = "tag",
TcpMaxReconnect = 123,
TcpReconnectDelay = Duration.Minutes(30)
});
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"
gelfLogDriver := awscdk.Aws_ecs.NewGelfLogDriver(&GelfLogDriverProps{
Address: jsii.String("address"),
// the properties below are optional
CompressionLevel: jsii.Number(123),
CompressionType: awscdk.*Aws_ecs.GelfCompressionType_GZIP,
Env: []*string{
jsii.String("env"),
},
EnvRegex: jsii.String("envRegex"),
Labels: []*string{
jsii.String("labels"),
},
Tag: jsii.String("tag"),
TcpMaxReconnect: jsii.Number(123),
TcpReconnectDelay: cdk.Duration_Minutes(jsii.Number(30)),
})
Initializer
ts
new GelfLogDriver(props: GelfLogDriverProps)
python
GelfLogDriver(props: GelfLogDriverProps)
java
new GelfLogDriver(GelfLogDriverProps props)
csharp
new GelfLogDriver(GelfLogDriverProps props)
go
NewGelfLogDriver(Props GelfLogDriverProps)
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) LogDriverstatic#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.