Skip to content
v2.274.0

SystemLogLevel Enum ​

Lambda service will automatically captures system logs about function invocation generated by the Lambda service (known as system 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.

Referenced by ​

  • CapacityProviderProps.systemLogLevelsystem_log_levelsystemLogLevelSystemLogLevelSystemLogLevel
  • FunctionOptions.systemLogLevelV2system_log_level_v2systemLogLevelV2SystemLogLevelV2SystemLogLevelV2