AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Namespaces | Macros | Functions
Logger.h File Reference
#include <atomic>
#include <chrono>
#include <mutex>
#include <sstream>
#include <vector>
#include <AVSCommon/Utils/Configuration/ConfigurationNode.h>
#include "AVSCommon/Utils/Logger/Level.h"
#include "AVSCommon/Utils/Logger/LogEntry.h"
#include "AVSCommon/Utils/Logger/LogLevelObserverInterface.h"
#include "AVSCommon/Utils/Logger/SinkObserverInterface.h"
Include dependency graph for Logger.h:

Go to the source code of this file.

Classes

class  alexaClientSDK::avsCommon::utils::logger::Logger
 

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::avsCommon
 
 alexaClientSDK::avsCommon::utils
 
 alexaClientSDK::avsCommon::utils::logger
 

Macros

#define ACSDK_STRINGIFY_INNER(expression)   #expression
 
#define ACSDK_STRINGIFY(macro)   ACSDK_STRINGIFY_INNER(macro)
 
#define ACSDK_CONCATENATE_INNER(lhs, rhs)   lhs##rhs
 
#define ACSDK_CONCATENATE(lhs, rhs)   ACSDK_CONCATENATE_INNER(lhs, rhs)
 
#define ACSDK_GET_LOGGER_FUNCTION_NAME(type)   ACSDK_CONCATENATE(ACSDK_CONCATENATE(get, type), Logger)
 
#define ACSDK_LOG_SINK   Console
 
#define ACSDK_GET_SINK_LOGGER   ACSDK_GET_LOGGER_FUNCTION_NAME(ACSDK_LOG_SINK)
 Build the get<type>Logger function name for whatever Logger logs will be sent to. More...
 
#define ACSDK_LOG(level, entry)
 Define log macro if logging is enabled. Else do nothing with params to avoid unused variable error. More...
 
#define ACSDK_DEBUG9(entry)
 
#define ACSDK_DEBUG8(entry)
 
#define ACSDK_DEBUG7(entry)
 
#define ACSDK_DEBUG6(entry)
 
#define ACSDK_DEBUG5(entry)
 
#define ACSDK_DEBUG4(entry)
 
#define ACSDK_DEBUG3(entry)
 
#define ACSDK_DEBUG2(entry)
 
#define ACSDK_DEBUG1(entry)
 
#define ACSDK_DEBUG0(entry)
 
#define ACSDK_DEBUG(entry)
 
#define ACSDK_INFO(entry)   ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::INFO, entry)
 
#define ACSDK_WARN(entry)   ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::WARN, entry)
 
#define ACSDK_ERROR(entry)   ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::ERROR, entry)
 
#define ACSDK_CRITICAL(entry)   ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::CRITICAL, entry)
 

Functions

std::shared_ptr< Logger > alexaClientSDK::avsCommon::utils::logger::ACSDK_GET_SINK_LOGGER ()
 
std::shared_ptr< Logger > alexaClientSDK::avsCommon::utils::logger::ACSDK_GET_LOGGER_FUNCTION ()
 

Macro Definition Documentation

◆ ACSDK_CONCATENATE

#define ACSDK_CONCATENATE (   lhs,
  rhs 
)    ACSDK_CONCATENATE_INNER(lhs, rhs)

Concatenate two macros in to a token.

Parameters
lhsThe macro to turn in to the left hand part of the token.
rhsThe macro to turn in to the right hand part of the token.

◆ ACSDK_CONCATENATE_INNER

#define ACSDK_CONCATENATE_INNER (   lhs,
  rhs 
)    lhs##rhs

Inner part of ACSDK_CONCATENATE. Concatenate two expressions in to a token.

Parameters
lhsThe expression to turn in to the left hand part of the token.
rhsThe expression to turn in to the right hand part of the token.

◆ ACSDK_CRITICAL

#define ACSDK_CRITICAL (   entry)    ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::CRITICAL, entry)

Send a CRITICAL severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG

#define ACSDK_DEBUG (   entry)

Compile out a DEBUG severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG0

#define ACSDK_DEBUG0 (   entry)

Compile out a DEBUG0 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG1

#define ACSDK_DEBUG1 (   entry)

Compile out a DEBUG1 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG2

#define ACSDK_DEBUG2 (   entry)

Compile out a DEBUG2 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG3

#define ACSDK_DEBUG3 (   entry)

Compile out a DEBUG3 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG4

#define ACSDK_DEBUG4 (   entry)

Compile out a DEBUG4 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG5

#define ACSDK_DEBUG5 (   entry)

Compile out a DEBUG5 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG6

#define ACSDK_DEBUG6 (   entry)

Compile out a DEBUG6 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG7

#define ACSDK_DEBUG7 (   entry)

Compile out a DEBUG7 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG8

#define ACSDK_DEBUG8 (   entry)

Compile out a DEBUG8 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_DEBUG9

#define ACSDK_DEBUG9 (   entry)

Compile out a DEBUG9 severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_ERROR

#define ACSDK_ERROR (   entry)    ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::ERROR, entry)

Send a ERROR severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_GET_LOGGER_FUNCTION_NAME

#define ACSDK_GET_LOGGER_FUNCTION_NAME (   type)    ACSDK_CONCATENATE(ACSDK_CONCATENATE(get, type), Logger)

Macro for building function name of the form get<type>Logger().

Parameters
typeThe type of Logger for which to build a get<type>Logger() function name.

◆ ACSDK_GET_SINK_LOGGER

#define ACSDK_GET_SINK_LOGGER   ACSDK_GET_LOGGER_FUNCTION_NAME(ACSDK_LOG_SINK)

Build the get<type>Logger function name for whatever Logger logs will be sent to.

◆ ACSDK_INFO

#define ACSDK_INFO (   entry)    ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::INFO, entry)

Send a INFO severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

◆ ACSDK_LOG

#define ACSDK_LOG (   level,
  entry 
)
Value:
do { \
(void)level; \
(void)entry; \
} while (false)

Define log macro if logging is enabled. Else do nothing with params to avoid unused variable error.

Null implementation for sending entries to the log.

Parameters
levelUnused.
entryUnused.

◆ ACSDK_LOG_SINK

#define ACSDK_LOG_SINK   Console

◆ ACSDK_STRINGIFY

#define ACSDK_STRINGIFY (   macro)    ACSDK_STRINGIFY_INNER(macro)

Turn a macro in to a string literal.

Parameters
macroThe macro to expand and turn in to a string literal.

◆ ACSDK_STRINGIFY_INNER

#define ACSDK_STRINGIFY_INNER (   expression)    #expression

Inner part of ACSDK_STRINGIFY. Turns an expression in to a string literal.

Parameters
expressionThe expression to turn in to a string literal.

◆ ACSDK_WARN

#define ACSDK_WARN (   entry)    ACSDK_LOG(alexaClientSDK::avsCommon::utils::logger::Level::WARN, entry)

Send a WARN severity log line.

Parameters
loggerArgThe Logger to send the line to.
entryThe text (or builder of the text) for the log entry.

AlexaClientSDK 1.25.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0