JournaldLogDriver 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 { aws_ecs as ecs } from 'aws-cdk-lib';
const journaldLogDriver = new ecs.JournaldLogDriver(/* all optional props */ {
env: ['env'],
envRegex: 'envRegex',
labels: ['labels'],
tag: 'tag',
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
journald_log_driver = ecs.JournaldLogDriver(
env=["env"],
env_regex="envRegex",
labels=["labels"],
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.services.ecs.*;
JournaldLogDriver journaldLogDriver = JournaldLogDriver.Builder.create()
.env(List.of("env"))
.envRegex("envRegex")
.labels(List.of("labels"))
.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.AWS.ECS;
var journaldLogDriver = new JournaldLogDriver(new JournaldLogDriverProps {
Env = new [] { "env" },
EnvRegex = "envRegex",
Labels = new [] { "labels" },
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 "github.com/aws/aws-cdk-go/awscdk"
journaldLogDriver := awscdk.Aws_ecs.NewJournaldLogDriver(&JournaldLogDriverProps{
Env: []*string{
jsii.String("env"),
},
EnvRegex: jsii.String("envRegex"),
Labels: []*string{
jsii.String("labels"),
},
Tag: jsii.String("tag"),
})
Initializer
ts
new JournaldLogDriver(props?: JournaldLogDriverProps)
python
JournaldLogDriver(props: typing.Optional[JournaldLogDriverProps] = None)
java
new JournaldLogDriver(JournaldLogDriverProps props)
csharp
new JournaldLogDriver(JournaldLogDriverProps? props = null)
go
NewJournaldLogDriver(Props JournaldLogDriverProps)
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.