ModErn Text Analysis
META Enumerates Textual Applications
|
logger: Main logging class. More...
#include <logger.h>
Classes | |
class | log_line |
log_line: Represents a single message to be written to all sinks. More... | |
class | sink |
sink: A wrapper for a stream that a logger should write to. More... | |
Public Types | |
enum | severity_level { progress, trace, debug, info, warning, error, fatal } |
severity_level: A demarcation of how severe a given message is. More... | |
Public Member Functions | |
void | add_sink (const sink &s) |
Adds a sink to the given logger. More... | |
void | add_sink (sink &&s) |
Adds a sink to the given logger. More... | |
void | write_to_sinks (const log_line &line) |
Writes the given log_line to all sinks. More... | |
Static Public Member Functions | |
static std::string | severity_string (severity_level sev) |
Determines the string form of a given severity_level. More... | |
Private Attributes | |
std::vector< sink > | sinks_ |
The list of sinks to write to. | |
logger: Main logging class.
Keeps track of a list of sinks to write lines to—these can be of any std::ostream-derived type.
|
strong |
severity_level: A demarcation of how severe a given message is.
Can be used to filter out messages below a certain threshold at the sink-specific level.
|
inlinestatic |
Determines the string form of a given severity_level.
sev | The severity level to get a string for. |
|
inline |
Adds a sink to the given logger.
s | The sink to add |
|
inline |
Adds a sink to the given logger.
s | The sink to add |
|
inline |