LogEntry is used to compile the log entry text to log via Logger.
More...
#include <LogEntry.h>
|
| LogEntry (const std::string &source, const char *event) |
|
| LogEntry (const std::string &source, const std::string &event) |
|
LogEntry & | d (const std::string &key, const char *value) |
|
LogEntry & | d (const char *key, char *value) |
|
LogEntry & | d (const char *key, const char *value) |
|
LogEntry & | d (const std::string &key, const std::string &value) |
|
LogEntry & | d (const char *key, const std::string &value) |
|
LogEntry & | d (const std::string &key, bool value) |
|
LogEntry & | d (const char *key, bool value) |
|
template<typename ValueType > |
LogEntry & | d (const char *key, const ValueType &value) |
|
template<typename ValueType > |
LogEntry & | sensitive (const char *key, const ValueType &value) |
|
LogEntry & | obfuscatePrivateData (const char *key, const std::string &value) |
|
LogEntry & | m (const char *message) |
|
LogEntry & | m (const std::string &message) |
|
template<typename PtrType > |
LogEntry & | p (const char *key, const std::shared_ptr< PtrType > &ptr) |
|
LogEntry & | p (const char *key, void *ptr) |
|
const char * | c_str () const |
|
LogEntry is used to compile the log entry text to log via Logger.
◆ LogEntry() [1/2]
alexaClientSDK::avsCommon::utils::logger::LogEntry::LogEntry |
( |
const std::string & |
source, |
|
|
const char * |
event |
|
) |
| |
Constructor.
- Parameters
-
source | The name of the source of this log entry. |
event | The name of the event that this log entry describes. |
◆ LogEntry() [2/2]
alexaClientSDK::avsCommon::utils::logger::LogEntry::LogEntry |
( |
const std::string & |
source, |
|
|
const std::string & |
event |
|
) |
| |
Constructor.
- Parameters
-
source | The name of the source of this log entry. |
event | The name of the event that this log entry describes. |
◆ c_str()
const char * alexaClientSDK::avsCommon::utils::logger::LogEntry::c_str |
( |
| ) |
const |
Get the rendered text of this LogEntry.
- Returns
- The rendered text of this LogEntry. The returned buffer is only guaranteed to be valid for the lifetime of this LogEntry, and only as long as no further modifications are made to it.
◆ d() [1/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const char * |
key, |
|
|
bool |
value |
|
) |
| |
Add data (hence the name 'd') in the form of a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The boolean value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [2/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const char * |
key, |
|
|
char * |
value |
|
) |
| |
Add a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [3/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const char * |
key, |
|
|
const char * |
value |
|
) |
| |
Add a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [4/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const char * |
key, |
|
|
const std::string & |
value |
|
) |
| |
Add data (hence the name 'd') in the form of a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [5/8]
template<typename ValueType >
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const char * |
key, |
|
|
const ValueType & |
value |
|
) |
| |
|
inline |
Add data (hence the name 'd') in the form of a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [6/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const std::string & |
key, |
|
|
bool |
value |
|
) |
| |
Add data (hence the name 'd') in the form of a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The boolean value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [7/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const std::string & |
key, |
|
|
const char * |
value |
|
) |
| |
Add a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ d() [8/8]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::d |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
Add data (hence the name 'd') in the form of a key
, value
pair to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ m() [1/2]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::m |
( |
const char * |
message | ) |
|
Add an arbitrary message to the end of the text of this LogEntry. Once this has been called no other additions should be made to this LogEntry.
- Parameters
-
message | The message to add to the end of the text of this LogEntry. |
- Returns
- This instance to facilitate passing this instance on.
◆ m() [2/2]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::m |
( |
const std::string & |
message | ) |
|
Add an arbitrary message to the end of the text of this LogEntry. Once this has been called no other additions should be made to this LogEntry.
- Parameters
-
message | The message to add to the end of the text of this LogEntry. |
- Returns
- This instance to facilitate passing this instance on.
◆ obfuscatePrivateData()
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::obfuscatePrivateData |
( |
const char * |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
inline |
Add data in the form of a key
, value
pair to the metadata of this log entry. If the value includes a privacy blacklist entry, the portion after that will be obfuscated. This is done in a distinct method (instead of m or d) to avoid the cost of always checking against the blacklist.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry, obfuscated if needed. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ p() [1/2]
template<typename PtrType >
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::p |
( |
const char * |
key, |
|
|
const std::shared_ptr< PtrType > & |
ptr |
|
) |
| |
Add pointer (hence the name 'p') in the form of a key
, address of the object pointed to by the shared_ptr ptr
to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
ptr | The shared_ptr of the object to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ p() [2/2]
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::p |
( |
const char * |
key, |
|
|
void * |
ptr |
|
) |
| |
Add pointer (hence the name 'p') in the form of a key
, address of the raw ptr
to the metadata of this log entry.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
ptr | The raw pointer of the object to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
◆ sensitive()
template<typename ValueType >
LogEntry & alexaClientSDK::avsCommon::utils::logger::LogEntry::sensitive |
( |
const char * |
key, |
|
|
const ValueType & |
value |
|
) |
| |
|
inline |
Add sensitive data in the form of a key
, value
pair to the metadata of this log entry. Because the data is 'sensitive' it will only be emitted in DEBUG builds.
- Parameters
-
key | The key identifying the value to add to this LogEntry. |
value | The value to add to this LogEntry. |
- Returns
- This instance to facilitate adding more information to this log entry.
The documentation for this class was generated from the following files:
- /workplace/avs-device-sdk/AVSCommon/Utils/include/AVSCommon/Utils/Logger/LogEntry.h
- /workplace/avs-device-sdk/AVSCommon/Utils/src/Logger/LogEntry.cpp
AlexaClientSDK 1.22.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0