| libcosmos
    Linux C++ System Programming Library | 
A simple standard logger that logs to cout/cerr. More...
#include <StdLogger.hxx>
 Inheritance diagram for cosmos::StdLogger:
 Inheritance diagram for cosmos::StdLogger:| Additional Inherited Members | |
|  Public Member Functions inherited from cosmos::ILogger | |
| std::ostream & | error () | 
| Log an error message. | |
| std::ostream & | warn () | 
| Log a warning message. | |
| std::ostream & | info () | 
| Log an info message. | |
| std::ostream & | debug () | 
| Log a debug message. | |
| void | setChannels (const bool error, const bool warning, const bool info, const bool debug) | 
| Enable/disable different log channels. | |
| void | setPrefix (const std::string_view prefix) | 
|  Protected Member Functions inherited from cosmos::ILogger | |
| std::ostream & | getStream (StreamState &state) | 
| std::ostream & | getNoopStream () | 
| void | setStreams (std::ostream &debug, std::ostream &info, std::ostream &warn, std::ostream &error) | 
| void | setStream (std::ostream &s, StreamState &state) | 
|  Static Protected Member Functions inherited from cosmos::ILogger | |
| static bool | isTTY (const std::ostream &o) | 
| Returns whether the given ostream is associated with a terminal or not. | |
|  Protected Attributes inherited from cosmos::ILogger | |
| std::stringstream | m_null | 
| A noop stream object to write to if a channel is disabled. | |
| StreamState | m_err | 
| StreamState | m_warn | 
| StreamState | m_info | 
| StreamState | m_debug | 
| std::string | m_common_prefix | 
| a common prefix to prepend to each message | |
A simple standard logger that logs to cout/cerr.
Except for the error stream all logged data goes to std::cout. The error stream, of course, goes to std::cerr.
Definition at line 14 of file StdLogger.hxx.
| cosmos::StdLogger::StdLogger | ( | ) | 
Definition at line 9 of file StdLogger.cxx.
| cosmos::StdLogger::~StdLogger | ( | ) | 
Definition at line 13 of file StdLogger.cxx.