# LoggingConfigurationProperty

Defines what execution history events are logged and where they are logged.

Step Functions provides the log levels — `OFF` , `ALL` , `ERROR` , and `FATAL` . No event types log when set to `OFF` and all event types do when set to `ALL` .

> By default, the `level` is set to `OFF` . For more information see [Log Levels](https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html) in the AWS Step Functions User Guide.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
const loggingConfigurationProperty: stepfunctions.CfnStateMachine.LoggingConfigurationProperty = {
  destinations: [{
    cloudWatchLogsLogGroup: {
      logGroupArn: 'logGroupArn',
    },
  }],
  includeExecutionData: false,
  level: 'level',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_stepfunctions as stepfunctions

logging_configuration_property = stepfunctions.CfnStateMachine.LoggingConfigurationProperty(
    destinations=[stepfunctions.CfnStateMachine.LogDestinationProperty(
        cloud_watch_logs_log_group=stepfunctions.CfnStateMachine.CloudWatchLogsLogGroupProperty(
            log_group_arn="logGroupArn"
        )
    )],
    include_execution_data=False,
    level="level"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.stepfunctions.*;

LoggingConfigurationProperty loggingConfigurationProperty = LoggingConfigurationProperty.builder()
        .destinations(List.of(LogDestinationProperty.builder()
                .cloudWatchLogsLogGroup(CloudWatchLogsLogGroupProperty.builder()
                        .logGroupArn("logGroupArn")
                        .build())
                .build()))
        .includeExecutionData(false)
        .level("level")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StepFunctions;

var loggingConfigurationProperty = new LoggingConfigurationProperty {
    Destinations = new [] { new LogDestinationProperty {
        CloudWatchLogsLogGroup = new CloudWatchLogsLogGroupProperty {
            LogGroupArn = "logGroupArn"
        }
    } },
    IncludeExecutionData = false,
    Level = "level"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

loggingConfigurationProperty := &LoggingConfigurationProperty{
	Destinations: []interface{}{
		&LogDestinationProperty{
			CloudWatchLogsLogGroup: &CloudWatchLogsLogGroupProperty{
				LogGroupArn: jsii.String("logGroupArn"),
			},
		},
	},
	IncludeExecutionData: jsii.Boolean(false),
	Level: jsii.String("level"),
}
```

## Properties

- `destinations`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnStateMachine.LogDestinationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.CfnStateMachine.LogDestinationProperty.html)[] — An array of objects that describes where your execution history events will be logged.

  Limited to size 1. Required, if your log level is not set to `OFF` .

- `includeExecutionData`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Determines whether execution data is included in your log.

  When set to `false` , data is excluded.

- `level`: string — Defines which category of execution history events are logged.
