Class: AWSCDK::Lambda::CfnFunction::LoggingConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/cfn_function.rb

Overview

The function's Amazon CloudWatch Logs configuration settings.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application_log_level: nil, log_format: nil, log_group: nil, system_log_level: nil) ⇒ LoggingConfigProperty

Returns a new instance of LoggingConfigProperty.

Parameters:

  • application_log_level (String, nil) (defaults to: nil)

    Set this property to filter the application logs for your function that Lambda sends to CloudWatch.

  • log_format (String, nil) (defaults to: nil)

    The format in which Lambda sends your function's application and system logs to CloudWatch.

  • log_group (String, nil) (defaults to: nil)

    The name of the Amazon CloudWatch log group the function sends logs to.

  • system_log_level (String, nil) (defaults to: nil)

    Set this property to filter the system logs for your function that Lambda sends to CloudWatch.



1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
# File 'lambda/cfn_function.rb', line 1471

def initialize(application_log_level: nil, log_format: nil, log_group: nil, system_log_level: nil)
  @application_log_level = application_log_level
  Jsii::Type.check_type(@application_log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationLogLevel") unless @application_log_level.nil?
  @log_format = log_format
  Jsii::Type.check_type(@log_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logFormat") unless @log_format.nil?
  @log_group = log_group
  Jsii::Type.check_type(@log_group, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logGroup") unless @log_group.nil?
  @system_log_level = system_log_level
  Jsii::Type.check_type(@system_log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "systemLogLevel") unless @system_log_level.nil?
end

Instance Attribute Details

#application_log_levelString? (readonly)

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.



1488
1489
1490
# File 'lambda/cfn_function.rb', line 1488

def application_log_level
  @application_log_level
end

#log_formatString? (readonly)

The format in which Lambda sends your function's application and system logs to CloudWatch.

Select between plain text and structured JSON.



1495
1496
1497
# File 'lambda/cfn_function.rb', line 1495

def log_format
  @log_format
end

#log_groupString? (readonly)

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.



1502
1503
1504
# File 'lambda/cfn_function.rb', line 1502

def log_group
  @log_group
end

#system_log_levelString? (readonly)

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.



1509
1510
1511
# File 'lambda/cfn_function.rb', line 1509

def system_log_level
  @system_log_level
end

Class Method Details

.jsii_propertiesObject



1511
1512
1513
1514
1515
1516
1517
1518
# File 'lambda/cfn_function.rb', line 1511

def self.jsii_properties
  {
    :application_log_level => "applicationLogLevel",
    :log_format => "logFormat",
    :log_group => "logGroup",
    :system_log_level => "systemLogLevel",
  }
end

Instance Method Details

#to_jsiiObject



1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lambda/cfn_function.rb', line 1520

def to_jsii
  result = {}
  result.merge!({
    "applicationLogLevel" => @application_log_level,
    "logFormat" => @log_format,
    "logGroup" => @log_group,
    "systemLogLevel" => @system_log_level,
  })
  result.compact
end