Class CfnLoggerDefinition.LoggerProperty
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.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Greengrass
Assembly: Amazon.CDK.AWS.Greengrass.dll
Syntax (csharp)
public class LoggerProperty : Object, CfnLoggerDefinition.ILoggerProperty
Syntax (vb)
Public Class LoggerProperty
Inherits Object
Implements CfnLoggerDefinition.ILoggerProperty
Remarks
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 AWS CloudFormation template, the Loggers
property of the LoggerDefinitionVersion
property type contains a list of Logger
property types.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Greengrass;
var loggerProperty = new LoggerProperty {
Component = "component",
Id = "id",
Level = "level",
Type = "type",
// the properties below are optional
Space = 123
};
Synopsis
Constructors
LoggerProperty() |
Properties
Component | The source of the log event. |
Id | A descriptive or arbitrary ID for the logger. |
Level | The log-level threshold. |
Space | The amount of file space (in KB) to use when writing logs to the local file system. |
Type | The storage mechanism for log events. |
Constructors
LoggerProperty()
public LoggerProperty()
Properties
Component
The source of the log event.
public string Component { get; set; }
Property Value
System.String
Remarks
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.
Id
A descriptive or arbitrary ID for the logger.
public string Id { get; set; }
Property Value
System.String
Remarks
This value must be unique within the logger definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+
.
Level
The log-level threshold.
public string Level { get; set; }
Property Value
System.String
Remarks
Log events below this threshold are filtered out and aren't stored. Valid values are DEBUG
, INFO
(recommended), WARN
, ERROR
, or FATAL
.
Space
The amount of file space (in KB) to use when writing logs to the local file system.
public Nullable<double> Space { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
This property does not apply for CloudWatch Logs .
Type
The storage mechanism for log events.
public string Type { get; set; }
Property Value
System.String
Remarks
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.