# LogOptions

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

- Source: [`aws-stepfunctions/lib/state-machine.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions/lib/state-machine.ts#L70)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
import * as logs from 'aws-cdk-lib/aws-logs';

const logGroup = new logs.LogGroup(this, 'MyLogGroup');

const definition = sfn.Chain.start(new sfn.Pass(this, 'Pass'));

new sfn.StateMachine(this, 'MyStateMachine', {
  definitionBody: sfn.DefinitionBody.fromChainable(definition),
  logs: {
    destination: logGroup,
    level: sfn.LogLevel.ALL,
  },
});
```

## Properties

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

  **Default:** No log group. Required if your log level is not set to OFF.

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

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