Class: AWSCDK::Greengrass::CfnLoggerDefinition::LoggerProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnLoggerDefinition::LoggerProperty
- Defined in:
- greengrass/cfn_logger_definition.rb
Overview
A logger represents logging settings for the AWS IoT Greengrass group, which can be stored in CloudWatch and the local file system of your core device.
All log entries include a timestamp, log level, and information about the event. For more information, see Monitoring with AWS IoT Greengrass Logs in the Developer Guide .
In an CloudFormation template, the Loggers property of the LoggerDefinitionVersion property type contains a list of Logger property types.
Instance Attribute Summary collapse
-
#component ⇒ String
readonly
The source of the log event.
-
#id ⇒ String
readonly
A descriptive or arbitrary ID for the logger.
-
#level ⇒ String
readonly
The log-level threshold.
-
#space ⇒ Numeric?
readonly
The amount of file space (in KB) to use when writing logs to the local file system.
-
#type ⇒ String
readonly
The storage mechanism for log events.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(component:, id:, level:, type:, space: nil) ⇒ LoggerProperty
constructor
A new instance of LoggerProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(component:, id:, level:, type:, space: nil) ⇒ LoggerProperty
Returns a new instance of LoggerProperty.
646 647 648 649 650 651 652 653 654 655 656 657 |
# File 'greengrass/cfn_logger_definition.rb', line 646 def initialize(component:, id:, level:, type:, space: nil) @component = component Jsii::Type.check_type(@component, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "component") @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") @level = level Jsii::Type.check_type(@level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "level") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @space = space Jsii::Type.check_type(@space, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "space") unless @space.nil? end |
Instance Attribute Details
#component ⇒ String (readonly)
The source of the log event.
Valid values are GreengrassSystem or Lambda . When GreengrassSystem is used, events from Greengrass system components are logged. When Lambda is used, events from user-defined Lambda functions are logged.
665 666 667 |
# File 'greengrass/cfn_logger_definition.rb', line 665 def component @component end |
#id ⇒ String (readonly)
A descriptive or arbitrary ID for the logger.
This value must be unique within the logger definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .
672 673 674 |
# File 'greengrass/cfn_logger_definition.rb', line 672 def id @id end |
#level ⇒ String (readonly)
The log-level threshold.
Log events below this threshold are filtered out and aren't stored. Valid values are DEBUG , INFO (recommended), WARN , ERROR , or FATAL .
679 680 681 |
# File 'greengrass/cfn_logger_definition.rb', line 679 def level @level end |
#space ⇒ Numeric? (readonly)
The amount of file space (in KB) to use when writing logs to the local file system.
This property does not apply for CloudWatch Logs .
693 694 695 |
# File 'greengrass/cfn_logger_definition.rb', line 693 def space @space end |
#type ⇒ String (readonly)
The storage mechanism for log events.
Valid values are FileSystem or AWSCloudWatch . When AWSCloudWatch is used, log events are sent to CloudWatch Logs . When FileSystem is used, log events are stored on the local file system.
686 687 688 |
# File 'greengrass/cfn_logger_definition.rb', line 686 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
695 696 697 698 699 700 701 702 703 |
# File 'greengrass/cfn_logger_definition.rb', line 695 def self.jsii_properties { :component => "component", :id => "id", :level => "level", :type => "type", :space => "space", } end |
Instance Method Details
#to_jsii ⇒ Object
705 706 707 708 709 710 711 712 713 714 715 |
# File 'greengrass/cfn_logger_definition.rb', line 705 def to_jsii result = {} result.merge!({ "component" => @component, "id" => @id, "level" => @level, "type" => @type, "space" => @space, }) result.compact end |