# LoggingOptions

Configures log settings for the domain.

- Source: [`aws-elasticsearch/lib/domain.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-elasticsearch/lib/domain.ts#L298)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
const prodDomain = new es.Domain(this, 'Domain', {
  version: es.ElasticsearchVersion.V7_1,
  capacity: {
    masterNodes: 5,
    dataNodes: 20,
  },
  ebs: {
    volumeSize: 20,
  },
  zoneAwareness: {
    availabilityZoneCount: 3,
  },
  logging: {
    slowSearchLogEnabled: true,
    appLogEnabled: true,
    slowIndexLogEnabled: true,
  },
});
```

## Properties

- `appLogEnabled`: boolean = false — use opensearchservice module instead

  Requires Elasticsearch version 5.1 or later.

- `appLogGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) — use opensearchservice module instead

  **Default:** a new log group is created if app logging is enabled

- `auditLogEnabled`: boolean = false — use opensearchservice module instead

  Requires Elasticsearch version 6.7 or later and fine grained access control to be enabled.

- `auditLogGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) — use opensearchservice module instead

  **Default:** a new log group is created if audit logging is enabled

- `slowIndexLogEnabled`: boolean = false — use opensearchservice module instead

  Requires Elasticsearch version 5.1 or later.

- `slowIndexLogGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) — use opensearchservice module instead

  **Default:** a new log group is created if slow index logging is enabled

- `slowSearchLogEnabled`: boolean = false — use opensearchservice module instead

  Requires Elasticsearch version 5.1 or later.

- `slowSearchLogGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) — use opensearchservice module instead

  **Default:** a new log group is created if slow search logging is enabled
