Skip to content
v2.273.0

ApplicationLogLevel Enum ​

Lambda service automatically captures logs generated by the function code (known as application logs) and sends these logs to a default CloudWatch log group named after the Lambda function.

Example ​

ts
import { ILogGroup } from 'aws-cdk-lib/aws-logs';

declare const logGroup: ILogGroup;

new lambda.Function(this, 'Lambda', {
  code: new lambda.InlineCode('foo'),
  handler: 'index.handler',
  runtime: lambda.Runtime.NODEJS_LATEST,
  loggingFormat: lambda.LoggingFormat.JSON,
  systemLogLevelV2: lambda.SystemLogLevel.INFO,
  applicationLogLevelV2: lambda.ApplicationLogLevel.INFO,
  logGroup: logGroup,
});

Members ​

MemberDescription
INFOLambda will capture only logs at info level.
DEBUGLambda will capture only logs at debug level.
WARNLambda will capture only logs at warn level.
TRACELambda will capture only logs at trace level.
ERRORLambda will capture only logs at error level.
FATALLambda will capture only logs at fatal level.

Referenced by ​

  • FunctionOptions.applicationLogLevelV2application_log_level_v2applicationLogLevelV2ApplicationLogLevelV2ApplicationLogLevelV2
  • ProviderOptions.providerLogLevelprovider_log_levelproviderLogLevelProviderLogLevelProviderLogLevel
  • ProviderProps.frameworkLambdaLoggingLevelframework_lambda_logging_levelframeworkLambdaLoggingLevelFrameworkLambdaLoggingLevelFrameworkLambdaLoggingLevel