# LoggingConfigProperty

The function's Amazon CloudWatch Logs configuration settings.

- Source: Generated at build time
- Type last changed: v2.109.0 · 16 Nov 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_lambda as lambda } from 'aws-cdk-lib';
const loggingConfigProperty: lambda.CfnFunction.LoggingConfigProperty = {
  applicationLogLevel: 'applicationLogLevel',
  logFormat: 'logFormat',
  logGroup: 'logGroup',
  systemLogLevel: 'systemLogLevel',
};
```

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_lambda as lambda_

logging_config_property = lambda.CfnFunction.LoggingConfigProperty(
    application_log_level="applicationLogLevel",
    log_format="logFormat",
    log_group="logGroup",
    system_log_level="systemLogLevel"
)
```

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.lambda.*;

LoggingConfigProperty loggingConfigProperty = LoggingConfigProperty.builder()
        .applicationLogLevel("applicationLogLevel")
        .logFormat("logFormat")
        .logGroup("logGroup")
        .systemLogLevel("systemLogLevel")
        .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.Lambda;

var loggingConfigProperty = new LoggingConfigProperty {
    ApplicationLogLevel = "applicationLogLevel",
    LogFormat = "logFormat",
    LogGroup = "logGroup",
    SystemLogLevel = "systemLogLevel"
};
```

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"

loggingConfigProperty := &LoggingConfigProperty{
	ApplicationLogLevel: jsii.String("applicationLogLevel"),
	LogFormat: jsii.String("logFormat"),
	LogGroup: jsii.String("logGroup"),
	SystemLogLevel: jsii.String("systemLogLevel"),
}
```

## Properties

- `applicationLogLevel`: string — Set this property to filter the application logs for your function that Lambda sends to CloudWatch.

  Lambda only sends application logs at the selected level of detail and lower, where `TRACE` is the highest level and `FATAL` is the lowest.

- `logFormat`: string — The format in which Lambda sends your function's application and system logs to CloudWatch.

  Select between plain text and structured JSON.

- `logGroup`: string — The name of the Amazon CloudWatch log group the function sends logs to.

  By default, Lambda functions send logs to a default log group named `/aws/lambda/<function name>` . To use a different log group, enter an existing log group or enter a new log group name.

- `systemLogLevel`: string — Set this property to filter the system logs for your function that Lambda sends to CloudWatch.

  Lambda only sends system logs at the selected level of detail and lower, where `DEBUG` is the highest level and `WARN` is the lowest.
