Skip to content
v2.278.0

LogConfig Struct ​

Interface for Logging Configuration of the Event Bus.

Example ​

ts
import { EventBus, IncludeDetail, Level } from 'aws-cdk-lib/aws-events';

const bus =  new EventBus(this, 'Bus', {
      logConfig: {
        includeDetail: IncludeDetail.FULL,
        level: Level.TRACE,
      },
    });
python
from aws_cdk.aws_events import EventBus, IncludeDetail, Level


bus = EventBus(self, "Bus",
    log_config=events.LogConfig(
        include_detail=IncludeDetail.FULL,
        level=Level.TRACE
    )
)
java
import software.amazon.awscdk.services.events.EventBus;
import software.amazon.awscdk.services.events.IncludeDetail;
import software.amazon.awscdk.services.events.Level;


EventBus bus = EventBus.Builder.create(this, "Bus")
        .logConfig(LogConfig.builder()
                .includeDetail(IncludeDetail.FULL)
                .level(Level.TRACE)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.Events;


var bus = new EventBus(this, "Bus", new EventBusProps {
    LogConfig = new LogConfig {
        IncludeDetail = IncludeDetail.FULL,
        Level = Level.TRACE
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"


bus := awscdk.NewEventBus(this, jsii.String("Bus"), &EventBusProps{
	LogConfig: &LogConfig{
		IncludeDetail: awscdk.IncludeDetail_FULL,
		Level: awscdk.Level_TRACE,
	},
})

Properties ​

includeDetailoptionalIncludeDetailinclude_detailoptionalIncludeDetailincludeDetailoptionalIncludeDetailIncludeDetailoptionalIncludeDetailIncludeDetailoptionalIncludeDetail #
Whether EventBridge include detailed event information in the records it generates.

Default: no details

leveloptionalLevelleveloptionalLevelleveloptionalLevelLeveloptionalLevelLeveloptionalLevel = OFF #
Logging level.