Alexa Auto SDK  2.0.0
Static Public Member Functions | List of all members
com.amazon.aace.logger.config.LoggerConfiguration Class Reference

Static Public Member Functions

static EngineConfiguration createConsoleSinkConfig (final String id, final Logger.Level level)
 
static EngineConfiguration createSyslogSinkConfig (final String id, final Logger.Level level)
 
static EngineConfiguration createFileSinkConfig (final String id, final Logger.Level level, final String path, final String prefix, final int maxSize, final int maxFiles, final boolean append)
 
static EngineConfiguration createFileSinkConfig (String id, Logger.Level level, String path)
 
static EngineConfiguration createLoggerRuleConfig (final String sink, final Logger.Level level, final String sourceFilter, final String tagFilter, final String messageFilter)
 
static EngineConfiguration createLoggerRuleConfig (String sink, Logger.Level level)
 

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 Function Documentation

◆ createConsoleSinkConfig()

static EngineConfiguration com.amazon.aace.logger.config.LoggerConfiguration.createConsoleSinkConfig ( final String  id,
final Logger.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
idThe id of sink object
levelThe log level to be used to filter logs to this sink

◆ createSyslogSinkConfig()

static EngineConfiguration com.amazon.aace.logger.config.LoggerConfiguration.createSyslogSinkConfig ( final String  id,
final Logger.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
idThe id of sink object
levelThe log level to be used to filter logs to this sink

◆ createFileSinkConfig() [1/2]

static EngineConfiguration com.amazon.aace.logger.config.LoggerConfiguration.createFileSinkConfig ( final String  id,
final Logger.Level  level,
final String  path,
final String  prefix,
final int  maxSize,
final int  maxFiles,
final boolean  append 
)
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
idThe id of sink object
levelThe log level to be used to filter logs to this sink
pathThe parent path where the log files will be written (must exist)
prefixThe prefix name given to the log file
maxSizeThe maximum log file size in bytes
maxFilesThe maximum number of log files to rotate
appendtrue If the logs should be appended to the existing file, false if the file should be overwritten

◆ createFileSinkConfig() [2/2]

static EngineConfiguration com.amazon.aace.logger.config.LoggerConfiguration.createFileSinkConfig ( String  id,
Logger.Level  level,
String  path 
)
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
idThe id of sink object
levelThe log level to be used to filter logs to this sink
pathThe parent path where the log files will be written (must exist)
prefixThe prefix name given to the log file
maxSizeThe maximum log file size in bytes
maxFilesThe maximum number of log files to rotate
appendtrue If the logs should be appended to the existing file, false if the file should be overwritten

◆ createLoggerRuleConfig() [1/2]

static EngineConfiguration com.amazon.aace.logger.config.LoggerConfiguration.createLoggerRuleConfig ( final String  sink,
final Logger.Level  level,
final String  sourceFilter,
final String  tagFilter,
final 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
sinkThe id of sink object to which this rule is applied
levelThe log level to be used as a filter for this rule
sourceFilterThe source regex to be used as a filter for this rule
tagFilterThe tag regex to be used as a filter for this rule
messageFilterThe message regex to be used as a filter for this rule

◆ createLoggerRuleConfig() [2/2]

static EngineConfiguration com.amazon.aace.logger.config.LoggerConfiguration.createLoggerRuleConfig ( String  sink,
Logger.Level  level 
)
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
sinkThe id of sink object to which this rule is applied
levelThe log level to be used as a filter for this rule
sourceFilterThe source regex to be used as a filter for this rule
tagFilterThe tag regex to be used as a filter for this rule
messageFilterThe message regex to be used as a filter for this rule

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