Alexa Auto SDK  4.3
Public Types | Static Public Member Functions | List of all members
aace::logger::config::LoggerConfiguration Class Reference

Public Types

using Level = aace::logger::LoggerEngineInterface::Level
 

Static Public Member Functions

static std::shared_ptr< aace::core::config::EngineConfigurationcreateConsoleSinkConfig (const std::string &id, Level level)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSyslogSinkConfig (const std::string &id, Level level)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateFileSinkConfig (const std::string &id, Level level, const std::string &path, const std::string &prefix="aace", uint32_t maxSize=5242880, uint32_t maxFiles=3, bool append=true)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateLoggerRuleConfig (const std::string &sink, Level level, const std::string &sourceFilter="", const std::string &tagFilter="", const std::string &messageFilter="")
 

Detailed Description

{
"aace.logger":
{
"sinks": [<Sink>],
"rules": [{"sink": "<SINK_ID>", "rule": <Rule>}]
}
}
<Sink>: {
"id": "<SINK_ID>"
"type": "<SINK_TYPE>",
"config": {
<CONFIG_DATA>
},
"rules": [<RuleConfiguration>]
}
<Rule>: {
"level": "<LOG_LEVEL>",
"source": "<SOURCE_FILTER>",
"tag": "<TAG_FILTER>",
"message": "<MESSAGE_FILTER>"
}

Member Typedef Documentation

◆ Level

Specifies the severity level of a log message

See also
aace::logger::LoggerEngineInterface::Level

Member Function Documentation

◆ createConsoleSinkConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::logger::config::LoggerConfiguration::createConsoleSinkConfig ( const std::string &  id,
Level  level 
)
static

Factory method used to programmatically generate logger configuration data for a console sink. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.logger":
{
"sinks": [{
"id": "<SINK_ID>",
"type": "aace.logger.sink.console",
"rules": [{
"level": <LOG_LEVEL>
}]
}
}
}
Parameters
[in]idThe id of sink object
[in]levelThe log level to be used to filter logs to this sink

◆ createSyslogSinkConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::logger::config::LoggerConfiguration::createSyslogSinkConfig ( const std::string &  id,
Level  level 
)
static

Factory method used to programmatically generate logger configuration data for a syslog sink. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.logger":
{
"sinks": [{
"id": "<SINK_ID>",
"type": "aace.logger.sink.syslog",
"rules": [{
"level": <LOG_LEVEL>
}]
}
}
}
Parameters
[in]idThe id of sink object
[in]levelThe log level to be used to filter logs to this sink

◆ createFileSinkConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::logger::config::LoggerConfiguration::createFileSinkConfig ( const std::string &  id,
Level  level,
const std::string &  path,
const std::string &  prefix = "aace",
uint32_t  maxSize = 5242880,
uint32_t  maxFiles = 3,
bool  append = true 
)
static

Factory method used to programmatically generate logger configuration data for a file sink. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.logger":
{
"sinks": [{
"id": "<SINK_ID>",
"type": "aace.logger.sink.file",
"config": {
"path": "<PATH>",
"prefix": "<PREFIX>",
"maxSize": <MAX_SIZE>,
"maxFiles": <MAX_FILES>,
"append": <APPEND>
}
"rules": [{
"level": <LOG_LEVEL>
}]
}
}
}
Parameters
[in]idThe id of sink object
[in]levelThe log level to be used to filter logs to this sink
[in]pathThe parent path where the log files will be written (must exist)
[in]prefixThe prefix name given to the log file
[in]maxSizeThe maximum log file size in bytes
[in]maxFilesThe maximum number of log files to rotate
[in]appendtrue If the logs should be appended to the existing file, false if the file should be overwritten

◆ createLoggerRuleConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::logger::config::LoggerConfiguration::createLoggerRuleConfig ( const std::string &  sink,
Level  level,
const std::string &  sourceFilter = "",
const std::string &  tagFilter = "",
const std::string &  messageFilter = "" 
)
static

Factory method used to programmatically generate configuration data for a logger rule. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.logger":
{
"rules": [{
"sink": "<SINK_ID>",
"rule": {
"level": <LOG_LEVEL>,
"source": "<SOURCE_FILTER>",
"tag": "<TAG_FILTER>",
"message": "<MESSAGE_FILTER>"
}
}
}
}
Parameters
[in]sinkThe id of sink object to which this rule is applied
[in]levelThe log level to be used as a filter for this rule
[in]sourceFilterThe source regex to be used as a filter for this rule
[in]tagFilterThe tag regex to be used as a filter for this rule
[in]messageFilterThe message regex to be used as a filter for this rule

Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0