|
| StreamLogger (Level minLevel, std::ostream &out, std::ostream &error) |
| Create a stream logger that logs to the given output stream and error output stream. More...
|
|
| StreamLogger (Level minLevel) |
| Create a stream logger that logs to stdout, stderr. More...
|
|
void | logImpl (Level level, const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details) override |
| Subclasses must implement this method to log messages. More...
|
|
void | log (Level level, const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details) override final |
| Grabs the lock and calls logImpl. More...
|
|
| Logger (bool debugEnabled) |
|
| Logger (bool debugEnabled) |
|
virtual | ~Logger ()=default |
|
bool | getDebugEnabled () |
|
virtual void | error (const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details=nullptr) |
| Report an error. More...
|
|
virtual void | warning (const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details=nullptr) |
| Report a warning. More...
|
|
virtual void | info (const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details=nullptr) |
| Report an informational message. More...
|
|
void | debug (const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details=nullptr) |
| Report a debug message. More...
|
|
void | debug (std::function< void(std::string &subsystem, std::string &msg, std::unique_ptr< std::map< std::string, std::any >> &details)> debugFunc) |
| Call the debug function callback only if debug is enabled then log a debug message. More...
|
|
|
enum class | Level { Debug
, Info
, Warning
, Error
} |
|
virtual void | debugImpl (const std::string &subsystem, const std::string &msg, const std::map< std::string, std::any > *details) |
| Overrideable version of debug. Only gets called if debug is enabled. More...
|
|
virtual void | debugImpl (std::function< void(std::string &subsystem, std::string &msg, std::unique_ptr< std::map< std::string, std::any >> &details)> debugFunc) |
| Overrideable version of debug. Only gets called if debug is enabled. More...
|
|
std::mutex | mutex |
| Mutex to protect the stream from interleaved logging writes. More...
|
|
bool | debugEnabled = false |
| Enable or disable debug messages. More...
|
|
A logger that writes to a C++ std::ostream.
Definition at line 145 of file Logging.h.