# LogOptions

Log Options for the state machine.

- Source: [`custom-resources/lib/provider-framework/waiter-state-machine.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/custom-resources/lib/provider-framework/waiter-state-machine.ts#L15)
- Type last changed: v2.235.0 · 15 Jan 2026

## 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';
import { custom_resources } from 'aws-cdk-lib';
import { aws_logs as interfaces_logs } from 'aws-cdk-lib/interfaces';

declare const logGroupRef: interfaces_logs.ILogGroupRef;
const logOptions: custom_resources.LogOptions = {
  destination: logGroupRef,
  includeExecutionData: false,
  level: stepfunctions.LogLevel.OFF,
};
```

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
from aws_cdk import custom_resources
from aws_cdk.interfaces import aws_logs as interfaces_logs

# log_group_ref: interfaces_logs.ILogGroupRef

log_options = custom_resources.LogOptions(
    destination=log_group_ref,
    include_execution_data=False,
    level=stepfunctions.LogLevel.OFF
)
```

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.*;
import software.amazon.awscdk.customresources.*;
import software.amazon.awscdk.interfaces.logs.*;

ILogGroupRef logGroupRef;

LogOptions logOptions = LogOptions.builder()
        .destination(logGroupRef)
        .includeExecutionData(false)
        .level(LogLevel.OFF)
        .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;
using Amazon.CDK.CustomResources;
using Amazon.CDK.Interfaces.Logs;

ILogGroupRef logGroupRef;

var logOptions = new LogOptions {
    Destination = logGroupRef,
    IncludeExecutionData = false,
    Level = LogLevel.OFF
};
```

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"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var logGroupRef ILogGroupRef

logOptions := &LogOptions{
	Destination: logGroupRef,
	IncludeExecutionData: jsii.Boolean(false),
	Level: awscdk.Aws_stepfunctions.LogLevel_OFF,
}
```

## Properties

- `destination`: [ILogGroupRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) — The log group where the execution history events will be logged.

  **Default:** a new log group will be created

- `includeExecutionData`: boolean = false — Determines whether execution data is included in your log.

- `level`: [LogLevel](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.LogLevel.html) = ERROR — Defines which category of execution history events are logged.
