> **Experimental**
>
> `@aws-cdk/aws-msk-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# BrokerLogging

Configuration details related to broker logs.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts#L302)

## Example

TypeScript:

```ts
declare const vpc: ec2.Vpc;
declare const bucket: s3.IBucket;
const cluster = new msk.Cluster(this, 'cluster', {
  clusterName: 'myCluster',
  kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
  vpc,
  logging: {
    s3: {
      bucket,
    },
  },
});
```

Python:

```python
# vpc: ec2.Vpc
# bucket: s3.IBucket

cluster = msk.Cluster(self, "cluster",
    cluster_name="myCluster",
    kafka_version=msk.KafkaVersion.V4_1_X_KRAFT,
    vpc=vpc,
    logging=msk.BrokerLogging(
        s3=msk.S3LoggingConfiguration(
            bucket=bucket
        )
    )
)
```

Java:

```java
Vpc vpc;
IBucket bucket;

Cluster cluster = Cluster.Builder.create(this, "cluster")
        .clusterName("myCluster")
        .kafkaVersion(KafkaVersion.V4_1_X_KRAFT)
        .vpc(vpc)
        .logging(BrokerLogging.builder()
                .s3(S3LoggingConfiguration.builder()
                        .bucket(bucket)
                        .build())
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MSK.Alpha
Vpc vpc;
IBucket bucket;

var cluster = new Cluster(this, "cluster", new ClusterProps {
    ClusterName = "myCluster",
    KafkaVersion = KafkaVersion.V4_1_X_KRAFT,
    Vpc = vpc,
    Logging = new BrokerLogging {
        S3 = new S3LoggingConfiguration {
            Bucket = bucket
        }
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkmskalpha/v2
var vpc Vpc
var bucket IBucket

cluster := msk.NewCluster(this, jsii.String("cluster"), &ClusterProps{
	ClusterName: jsii.String("myCluster"),
	KafkaVersion: msk.KafkaVersion_V4_1_X_KRAFT(),
	Vpc: Vpc,
	Logging: &BrokerLogging{
		S3: &S3LoggingConfiguration{
			Bucket: *Bucket,
		},
	},
})
```

## Properties

- `cloudwatchLogGroup`: [ILogGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html) = disabled — The CloudWatch Logs group that is the destination for broker logs.

- `firehoseDeliveryStreamName`: string = disabled — The Amazon Data Firehose delivery stream that is the destination for broker logs.

- `s3`: [S3LoggingConfiguration](/cdk/api/v2/docs/@aws-cdk_aws-msk-alpha.S3LoggingConfiguration.html) = disabled — Details of the Amazon S3 destination for broker logs.
