> **Experimental**
>
> `@aws-cdk/aws-pipes-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# LogLevel

Log configuration for a pipe.

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/logs.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-pipes-alpha/lib/logs.ts#L23)

## Example

TypeScript:

```ts
declare const sourceQueue: sqs.Queue;
declare const targetQueue: sqs.Queue;
declare const logGroup: logs.LogGroup;

const cwlLogDestination = new pipes.CloudwatchLogsLogDestination(logGroup);

const pipe = new pipes.Pipe(this, 'Pipe', {
  source: new SqsSource(sourceQueue),
  target: new SqsTarget(targetQueue),
  logLevel: pipes.LogLevel.TRACE,
  logIncludeExecutionData: [pipes.IncludeExecutionData.ALL],
  logDestinations: [cwlLogDestination],
});
```

Python:

```python
# source_queue: sqs.Queue
# target_queue: sqs.Queue
# log_group: logs.LogGroup

cwl_log_destination = pipes.CloudwatchLogsLogDestination(log_group)

pipe = pipes.Pipe(self, "Pipe",
    source=SqsSource(source_queue),
    target=SqsTarget(target_queue),
    log_level=pipes.LogLevel.TRACE,
    log_include_execution_data=[pipes.IncludeExecutionData.ALL],
    log_destinations=[cwl_log_destination]
)
```

Java:

```java
Queue sourceQueue;
Queue targetQueue;
LogGroup logGroup;

CloudwatchLogsLogDestination cwlLogDestination = new CloudwatchLogsLogDestination(logGroup);

Pipe pipe = Pipe.Builder.create(this, "Pipe")
        .source(new SqsSource(sourceQueue))
        .target(new SqsTarget(targetQueue))
        .logLevel(LogLevel.TRACE)
        .logIncludeExecutionData(List.of(IncludeExecutionData.ALL))
        .logDestinations(List.of(cwlLogDestination))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Alpha
Queue sourceQueue;
Queue targetQueue;
LogGroup logGroup;

var cwlLogDestination = new CloudwatchLogsLogDestination(logGroup);

var pipe = new Pipe(this, "Pipe", new PipeProps {
    Source = new SqsSource(sourceQueue),
    Target = new SqsTarget(targetQueue),
    LogLevel = LogLevel.TRACE,
    LogIncludeExecutionData = new [] { IncludeExecutionData.ALL },
    LogDestinations = new [] { cwlLogDestination }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipesalpha/v2
var sourceQueue Queue
var targetQueue Queue
var logGroup LogGroup

cwlLogDestination := pipes.NewCloudwatchLogsLogDestination(logGroup)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: awscdkpipestargetsalpha.NewSqsTarget(targetQueue),
	LogLevel: pipes.LogLevel_TRACE,
	LogIncludeExecutionData: []aLL{
		pipes.IncludeExecutionData_*aLL,
	},
	LogDestinations: []ILogDestination{
		cwlLogDestination,
	},
})
```

## Members

| Member | Description |
| --- | --- |
| `OFF` | No logging. |
| `ERROR` | Log only errors. |
| `INFO` | Log errors, warnings, and info. |
| `TRACE` | Log everything. |

## Referenced by

- [`PipeProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-alpha.PipeProps.html).logLevel
