A log that sends all the log messages into another log. More...
#include <Logger.h>
Classes | |
struct | Message |
Public Types | |
using | UMessage = std::shared_ptr< Message > |
Public Member Functions | |
Logger (LogEngine &destination, String prefix="") | |
Constructor. More... | |
LogEngine & | destination () |
Returns log engine (destination logger) | |
void | log (LogPriority priority, const String &message) |
void | debug (const String &message) |
void | info (const String &message) |
void | notice (const String &message) |
void | warning (const String &message) |
void | error (const String &message) |
void | critical (const String &message) |
A log that sends all the log messages into another log.
The destination log is locked for a message adding period. Multiple Logger objects may send messages from different threads into the same destination log. The log options defining message format and min priority are used from destination log.
Constructor.
destination | Destination logger |
prefix | Optional log message prefix |
void sptk::Logger::critical | ( | const String & | message | ) |
Log message with critical priority
message | Message text |
void sptk::Logger::debug | ( | const String & | message | ) |
Log message with debug priority
message | Message text |
void sptk::Logger::error | ( | const String & | message | ) |
Log message with error priority
message | Message text |
void sptk::Logger::info | ( | const String & | message | ) |
Log message with info priority
message | Message text |
void sptk::Logger::log | ( | LogPriority | priority, |
const String & | message | ||
) |
void sptk::Logger::notice | ( | const String & | message | ) |
Log message with notice priority
message | Message text |
void sptk::Logger::warning | ( | const String & | message | ) |
Log message with warning priority
message | Message text |