![]() |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Namespaces | |
test | |
Classes | |
class | ConsoleLogger |
class | LogEntry |
LogEntry is used to compile the log entry text to log via Logger. More... | |
class | LogEntryBuffer |
class | LogEntryStream |
class | Logger |
class | LoggerSinkManager |
class | LogLevelObserverInterface |
class | LogStringFormatter |
class | ModuleLogger |
class | SinkObserverInterface |
class | TestTrace |
class | ThreadMoniker |
Enumerations | |
enum | Level { Level::DEBUG9, Level::DEBUG8, Level::DEBUG7, Level::DEBUG6, Level::DEBUG5, Level::DEBUG4, Level::DEBUG3, Level::DEBUG2, Level::DEBUG1, Level::DEBUG0, Level::INFO, Level::WARN, Level::ERROR, Level::CRITICAL, Level::NONE, Level::UNKNOWN } |
Functions | |
std::shared_ptr< Logger > | getConsoleLogger () |
std::string | convertLevelToName (Level level) |
char | convertLevelToChar (Level level) |
Level | convertNameToLevel (const std::string &name) |
std::ostream & | operator<< (std::ostream &stream, Level level) |
std::shared_ptr< Logger > | ACSDK_GET_SINK_LOGGER () |
std::shared_ptr< Logger > | ACSDK_GET_LOGGER_FUNCTION () |
void | acsdkDebug9 (const LogEntry &entry) |
void | acsdkDebug8 (const LogEntry &entry) |
void | acsdkDebug7 (const LogEntry &entry) |
void | acsdkDebug6 (const LogEntry &entry) |
void | acsdkDebug5 (const LogEntry &entry) |
void | acsdkDebug4 (const LogEntry &entry) |
void | acsdkDebug3 (const LogEntry &entry) |
void | acsdkDebug2 (const LogEntry &entry) |
void | acsdkDebug1 (const LogEntry &entry) |
void | acsdkDebug0 (const LogEntry &entry) |
void | acsdkDebug (const LogEntry &entry) |
void | acsdkInfo (const LogEntry &entry) |
void | acsdkWarn (const LogEntry &entry) |
void | acsdkError (const LogEntry &entry) |
void | acsdkCritical (const LogEntry &entry) |
void | logEntry (Level level, const LogEntry &entry) |
void | dumpBytesToStream (std::ostream &stream, const char *prefix, size_t width, const unsigned char *data, size_t size) |
static std::atomic< int > | g_nextThreadMoniker (1) |
Counter to generate (small) unique thread monikers. More... | |
std::shared_ptr< Logger > | getLoggerTestLogger () |
Variables | |
static const std::string | CONFIG_KEY_DEFAULT_LOGGER = "consoleLogger" |
Configuration key for DefaultLogger settings. More... | |
static const char * | RESERVED_METADATA_CHARS = R"(\,=:)" |
List of characters we need to escape. More... | |
static const std::string | ESCAPED_METADATA_ESCAPE = R"(\\)" |
Escape sequence for ''. More... | |
static const std::string | ESCAPED_PAIR_SEPARATOR = R"(\,)" |
Escape sequence for ','. More... | |
static const std::string | ESCAPED_SECTION_SEPARATOR = R"(\:)" |
Escape sequence for ':'. More... | |
static const std::string | ESCAPED_KEY_VALUE_SEPARATOR = R"(\=)" |
Escape sequence for '='. More... | |
static const char | METADATA_ESCAPE = '\\' |
Reserved in metadata sequences for escaping other reserved values. More... | |
static const char | PAIR_SEPARATOR = ',' |
Reserved in metadata sequences to separate key,value pairs. More... | |
static const char | SECTION_SEPARATOR = ':' |
Reserved in metadata sequences to separate them from a preceding event and an optional terminal message. More... | |
static const std::string | BOOL_TRUE = "true" |
String for boolean TRUE. More... | |
static const std::string | BOOL_FALSE = "false" |
String for boolean FALSE. More... | |
static const std::string | CONFIG_KEY_LOGGER = "logger" |
Configuration key for root level "logger" object. More... | |
static const std::string | CONFIG_KEY_LOG_LEVEL = "logLevel" |
Configuration key for "logLevel" values under "logger" and other per-module objects. More... | |
static constexpr auto | AT_EXIT_THREAD_ID = "0" |
static const char * | STRFTIME_FORMAT_STRING = "%Y-%m-%d %H:%M:%S" |
Format string for strftime() to produce date and time in the format "YYYY-MM-DD HH:MM:SS". More... | |
static const int | DATE_AND_TIME_STRING_SIZE = 20 |
Size of buffer needed to hold "YYYY-MM-DD HH:MM:SS" and a null terminator. More... | |
static const char | TIME_AND_MILLIS_SEPARATOR = '.' |
Separator between date/time and millis. More... | |
static const char * | MILLIS_FORMAT_STRING = "%03d" |
static const int | MILLIS_STRING_SIZE = 4 |
Size of buffer needed to hold "nnn" (milliseconds value) and a null terminator. More... | |
static const std::string | MILLIS_AND_THREAD_SEPARATOR = " [" |
Separator string between milliseconds value and ExampleLogger name. More... | |
static const std::string | THREAD_AND_LEVEL_SEPARATOR = "] " |
Separator between thread ID and level indicator in log lines. More... | |
static const char | LEVEL_AND_TEXT_SEPARATOR = ' ' |
Separator between level indicator and text in log lines. More... | |
static const int | MILLISECONDS_PER_SECOND = 1000 |
Number of milliseconds per second. More... | |
|
strong |
Enum used to specify the severity assigned to a log message.
|
inline |
Inline method to get the function that ACSDK_<LEVEL> macros will send logs to. In this case ACSDK_LOG_MODULE
was not defined, so logs are sent to the Logger
returned by get<ACSDK_LOG_SINK>Logger()
.
std::shared_ptr<Logger> alexaClientSDK::avsCommon::utils::logger::ACSDK_GET_SINK_LOGGER | ( | ) |
void alexaClientSDK::avsCommon::utils::logger::acsdkCritical | ( | const LogEntry & | entry | ) |
Log a Level::CRITICAL severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG0 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug0 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG0 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug1 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG1 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug2 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG2 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug3 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG3 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug4 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG4 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug5 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG5 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug6 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG6 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug7 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG7 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug8 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG8 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkDebug9 | ( | const LogEntry & | entry | ) |
Log a LEVEL::DEBUG9 severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkError | ( | const LogEntry & | entry | ) |
Log a Level::ERROR severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkInfo | ( | const LogEntry & | entry | ) |
Log a Level::INFO severity entry.
entry | A log entry. |
void alexaClientSDK::avsCommon::utils::logger::acsdkWarn | ( | const LogEntry & | entry | ) |
Log a Level::WARN severity entry.
entry | A log entry. |
char alexaClientSDK::avsCommon::utils::logger::convertLevelToChar | ( | Level | level | ) |
Get a character corresponding to a Level value. The characters returned are unique per log level and are intended to be used to minimize the space taken up by the level specifier in log lines.
level | The Level for which to get the corresponding character. |
level
is not recognized, returns 'U'. std::string alexaClientSDK::avsCommon::utils::logger::convertLevelToName | ( | Level | level | ) |
Get the name of a Level value.
level | The Level to get the name of. |
Level alexaClientSDK::avsCommon::utils::logger::convertNameToLevel | ( | const std::string & | name | ) |
Get the Level corresponding to a Level name.
name | The name corresponding to the desired Level value. |
Level
corresponding to the specified name. If the name
is not recognized, returns Level::UNKNOWN
. void alexaClientSDK::avsCommon::utils::logger::dumpBytesToStream | ( | std::ostream & | stream, |
const char * | prefix, | ||
size_t | width, | ||
const unsigned char * | data, | ||
size_t | size | ||
) |
Stream out an array of bytes as a hex dump.
stream | The stream to render to. |
prefix | A prefix added to each row. |
width | The number of bytes to output per row. |
data | The bytes to render. |
size | The number of bytes to render. |
|
static |
Counter to generate (small) unique thread monikers.
std::shared_ptr< Logger > alexaClientSDK::avsCommon::utils::logger::getConsoleLogger | ( | ) |
Return the singleton instance of ConsoleLogger
.
ConsoleLogger
. std::shared_ptr<Logger> alexaClientSDK::avsCommon::utils::logger::getLoggerTestLogger | ( | ) |
Logs an entry at a severity level using the logger instance defined by ACSDK_GET_LOGGER_FUNCTION (refer to Logger.h).
level | The severity level of the log. |
entry | A log entry. |
|
inline |
Write a log severity Level
value to an ostream
as a string.
stream | The stream to write the value to. |
level | The Level value to write to the ostream as a string. |
ostream
that was passed in and written to.
|
staticconstexpr |
|
static |
String for boolean FALSE.
|
static |
String for boolean TRUE.
|
static |
Configuration key for DefaultLogger settings.
|
static |
Configuration key for "logLevel" values under "logger" and other per-module objects.
|
static |
Configuration key for root level "logger" object.
|
static |
Size of buffer needed to hold "YYYY-MM-DD HH:MM:SS" and a null terminator.
|
static |
Escape sequence for '='.
|
static |
Escape sequence for ''.
|
static |
Escape sequence for ','.
|
static |
Escape sequence for ':'.
|
static |
Separator between level indicator and text in log lines.
|
static |
Reserved in metadata sequences for escaping other reserved values.
|
static |
Separator string between milliseconds value and ExampleLogger name.
|
static |
|
static |
Size of buffer needed to hold "nnn" (milliseconds value) and a null terminator.
|
static |
Number of milliseconds per second.
|
static |
Reserved in metadata sequences to separate key,value pairs.
|
static |
List of characters we need to escape.
|
static |
Reserved in metadata sequences to separate them from a preceding event and an optional terminal message.
|
static |
Format string for strftime() to produce date and time in the format "YYYY-MM-DD HH:MM:SS".
|
static |
Separator between thread ID and level indicator in log lines.
|
static |
Separator between date/time and millis.
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0