Class LogDrivers
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.LogDrivers
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-12T17:54:12.848Z")
@Stability(Stable)
public class LogDrivers
extends software.amazon.jsii.JsiiObject
The base class for log drivers.
Example:
Secret secret;
// Create a Task Definition for the container to start
Ec2TaskDefinition taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("example-image"))
.memoryLimitMiB(256)
.logging(LogDrivers.splunk(SplunkLogDriverProps.builder()
.secretToken(secret)
.url("my-splunk-url")
.build()))
.build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLogDrivers(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedLogDrivers(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic LogDriverawsLogs(AwsLogDriverProps props) Creates a log driver configuration that sends log information to CloudWatch Logs.static LogDriverfirelens(FireLensLogDriverProps props) Creates a log driver configuration that sends log information to firelens log router.static LogDriverfluentd()Creates a log driver configuration that sends log information to fluentd Logs.static LogDriverfluentd(FluentdLogDriverProps props) Creates a log driver configuration that sends log information to fluentd Logs.static LogDrivergelf(GelfLogDriverProps props) Creates a log driver configuration that sends log information to gelf Logs.static LogDriverjournald()Creates a log driver configuration that sends log information to journald Logs.static LogDriverjournald(JournaldLogDriverProps props) Creates a log driver configuration that sends log information to journald Logs.static LogDriverjsonFile()Creates a log driver configuration that sends log information to json-file Logs.static LogDriverjsonFile(JsonFileLogDriverProps props) Creates a log driver configuration that sends log information to json-file Logs.static LogDriversplunk(SplunkLogDriverProps props) Creates a log driver configuration that sends log information to splunk Logs.static LogDriversyslog()Creates a log driver configuration that sends log information to syslog Logs.static LogDriversyslog(SyslogLogDriverProps props) Creates a log driver configuration that sends log information to syslog Logs.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
LogDrivers
protected LogDrivers(software.amazon.jsii.JsiiObjectRef objRef) -
LogDrivers
protected LogDrivers(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
LogDrivers
@Stability(Stable) public LogDrivers()
-
-
Method Details
-
awsLogs
Creates a log driver configuration that sends log information to CloudWatch Logs.- Parameters:
props- This parameter is required.
-
firelens
Creates a log driver configuration that sends log information to firelens log router.For detail configurations, please refer to Amazon ECS FireLens Examples: https://github.com/aws-samples/amazon-ecs-firelens-examples
- Parameters:
props- This parameter is required.
-
fluentd
Creates a log driver configuration that sends log information to fluentd Logs.- Parameters:
props-
-
fluentd
Creates a log driver configuration that sends log information to fluentd Logs. -
gelf
Creates a log driver configuration that sends log information to gelf Logs.- Parameters:
props- This parameter is required.
-
journald
@Stability(Stable) @NotNull public static LogDriver journald(@Nullable JournaldLogDriverProps props) Creates a log driver configuration that sends log information to journald Logs.- Parameters:
props-
-
journald
Creates a log driver configuration that sends log information to journald Logs. -
jsonFile
@Stability(Stable) @NotNull public static LogDriver jsonFile(@Nullable JsonFileLogDriverProps props) Creates a log driver configuration that sends log information to json-file Logs.- Parameters:
props-
-
jsonFile
Creates a log driver configuration that sends log information to json-file Logs. -
splunk
Creates a log driver configuration that sends log information to splunk Logs.- Parameters:
props- This parameter is required.
-
syslog
Creates a log driver configuration that sends log information to syslog Logs.- Parameters:
props-
-
syslog
Creates a log driver configuration that sends log information to syslog Logs.
-