#include <LogStringFormatter.h>
A class used to format log strings.
◆ LogStringFormatter()
alexaClientSDK::avsCommon::utils::logger::LogStringFormatter::LogStringFormatter |
( |
| ) |
|
◆ format()
std::string alexaClientSDK::avsCommon::utils::logger::LogStringFormatter::format |
( |
Level |
level, |
|
|
std::chrono::system_clock::time_point |
time, |
|
|
const char * |
threadMoniker, |
|
|
const char * |
text |
|
) |
| |
Formats a log message into a printable string with other metadata regarding the log message.
- Parameters
-
level | The severity Level of this log line. |
time | The time that the event to log occurred. |
threadMoniker | Moniker of the thread that generated the event. |
text | The text of the entry to log. |
- Returns
- The formatted string.
◆ getDateTimeString()
std::string alexaClientSDK::avsCommon::utils::logger::LogStringFormatter::getDateTimeString |
( |
std::chrono::system_clock::time_point |
time | ) |
|
Transforms a time_point into a string representing the date and time.
- Parameters
-
- Returns
- A string representing the time_point in "%Y-%m-%d %H:%M:%S" format, or an empty string if failure.
◆ getMillisecondString()
std::string alexaClientSDK::avsCommon::utils::logger::LogStringFormatter::getMillisecondString |
( |
std::chrono::system_clock::time_point |
time | ) |
|
Transforms a time_point into a string representing the milliseconds.
- Parameters
-
- Returns
- A string representing the number of milliseconds, or an empty string if failure.
The documentation for this class was generated from the following file:
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0