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.97.0 (build 729de35)", date="2024-04-18T17:54:16.510Z") @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

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    LogDrivers(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    LogDrivers(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static LogDriver
    Creates a log driver configuration that sends log information to CloudWatch Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to firelens log router.
    static LogDriver
    Creates a log driver configuration that sends log information to fluentd Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to fluentd Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to gelf Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to journald Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to journald Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to json-file Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to json-file Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to splunk Logs.
    static LogDriver
    Creates a log driver configuration that sends log information to syslog Logs.
    static LogDriver
    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, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      @Stability(Stable) @NotNull public static LogDriver awsLogs(@NotNull AwsLogDriverProps props)
      Creates a log driver configuration that sends log information to CloudWatch Logs.

      Parameters:
      props - This parameter is required.
    • firelens

      @Stability(Stable) @NotNull public static LogDriver firelens(@NotNull FireLensLogDriverProps props)
      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

      @Stability(Stable) @NotNull public static LogDriver fluentd(@Nullable FluentdLogDriverProps props)
      Creates a log driver configuration that sends log information to fluentd Logs.

      Parameters:
      props -
    • fluentd

      @Stability(Stable) @NotNull public static LogDriver fluentd()
      Creates a log driver configuration that sends log information to fluentd Logs.
    • gelf

      @Stability(Stable) @NotNull public static LogDriver gelf(@NotNull GelfLogDriverProps props)
      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

      @Stability(Stable) @NotNull public static LogDriver 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

      @Stability(Stable) @NotNull public static LogDriver jsonFile()
      Creates a log driver configuration that sends log information to json-file Logs.
    • splunk

      @Stability(Stable) @NotNull public static LogDriver splunk(@NotNull SplunkLogDriverProps props)
      Creates a log driver configuration that sends log information to splunk Logs.

      Parameters:
      props - This parameter is required.
    • syslog

      @Stability(Stable) @NotNull public static LogDriver syslog(@Nullable SyslogLogDriverProps props)
      Creates a log driver configuration that sends log information to syslog Logs.

      Parameters:
      props -
    • syslog

      @Stability(Stable) @NotNull public static LogDriver syslog()
      Creates a log driver configuration that sends log information to syslog Logs.