Class LogDriver

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.LogDriver
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
AwsLogDriver, FireLensLogDriver, FluentdLogDriver, GelfLogDriver, GenericLogDriver, JournaldLogDriver, JsonFileLogDriver, SplunkLogDriver, SyslogLogDriver

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-08-02T00:29:10.330Z") @Stability(Stable) public abstract class LogDriver extends software.amazon.jsii.JsiiObject
The base class for log drivers.

Example:

 // 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.awsLogs(AwsLogDriverProps.builder()
                 .streamPrefix("EventDemo")
                 .mode(AwsLogDriverMode.NON_BLOCKING)
                 .maxBufferSize(Size.mebibytes(25))
                 .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
     
    protected
    LogDriver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    LogDriver(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.
    bind(software.constructs.Construct scope, ContainerDefinition containerDefinition)
    Called when the log driver is configured on a container.

    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

    • LogDriver

      protected LogDriver(software.amazon.jsii.JsiiObjectRef objRef)
    • LogDriver

      protected LogDriver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • LogDriver

      @Stability(Stable) protected LogDriver()
  • 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.
    • bind

      @Stability(Stable) @NotNull public abstract LogDriverConfig bind(@NotNull software.constructs.Construct scope, @NotNull ContainerDefinition containerDefinition)
      Called when the log driver is configured on a container.

      Parameters:
      scope - This parameter is required.
      containerDefinition - This parameter is required.