Utility class used to show formatted message on the screen. A logger class for flashmatch. Simply shows a formatted colored message on a screen.
A static getter method is provided to create a sharable logger instance (see OpT0FinderBase for useage).
.
More...
#include <OpT0FinderLogger.h>
Public Member Functions | |
logger (const std::string &name="no_name") | |
Default constructor. More... | |
virtual | ~logger () |
Default destructor. More... | |
const std::string & | name () const |
Logger's name. More... | |
void | set (const msg::Level_t level) |
Verbosity level setter. More... | |
msg::Level_t | level () const |
Verbosity level getter. More... | |
bool | operator< (const logger &rhs) const |
Comparison operator for static collection of loggers. More... | |
bool | debug () const |
bool | info () const |
bool | normal () const |
bool | warning () const |
bool | error () const |
std::ostream & | send (const msg::Level_t) const |
Formatted message (simplest) More... | |
std::ostream & | send (const msg::Level_t level, const std::string &function) const |
Formatted message (function name included) More... | |
std::ostream & | send (const msg::Level_t level, const std::string &function, const unsigned int line_num) const |
Formatted message (function name + line number) More... | |
std::ostream & | send (const msg::Level_t level, const std::string &function, const unsigned int line_num, const std::string &file_name) const |
Formatted message (function name + line number + file name) More... | |
Static Public Member Functions | |
static logger & | get (const std::string name) |
Getter of a message instance. More... | |
static msg::Level_t | default_level () |
Default logger level getter. More... | |
static void | default_level (msg::Level_t l) |
Default logger level setter (only affect future loggers) More... | |
static void | force_level (msg::Level_t l) |
Force all loggers to change level. More... | |
Private Attributes | |
std::ostream * | _ostrm |
ostream More... | |
msg::Level_t | _level |
Level. More... | |
std::string | _name |
Name. More... | |
Static Private Attributes | |
static std::map< std::string, flashmatch::logger > * | _logger_m = nullptr |
Set of loggers. More... | |
static msg::Level_t | _level_default = msg::kNORMAL |
Default logger level. More... | |
Utility class used to show formatted message on the screen. A logger class for flashmatch. Simply shows a formatted colored message on a screen.
A static getter method is provided to create a sharable logger instance (see OpT0FinderBase for useage).
.
Definition at line 30 of file OpT0FinderLogger.h.
|
inline |
Default constructor.
Definition at line 35 of file OpT0FinderLogger.h.
|
inlinevirtual |
|
inline |
Definition at line 105 of file OpT0FinderLogger.h.
|
inlinestatic |
Default logger level getter.
Definition at line 92 of file OpT0FinderLogger.h.
|
inlinestatic |
Default logger level setter (only affect future loggers)
Definition at line 94 of file OpT0FinderLogger.h.
|
inline |
Definition at line 109 of file OpT0FinderLogger.h.
|
inlinestatic |
Force all loggers to change level.
Definition at line 96 of file OpT0FinderLogger.h.
|
inlinestatic |
Getter of a message instance.
Definition at line 80 of file OpT0FinderLogger.h.
|
inline |
Definition at line 106 of file OpT0FinderLogger.h.
|
inline |
|
inline |
|
inline |
Definition at line 107 of file OpT0FinderLogger.h.
|
inline |
Comparison operator for static collection of loggers.
Definition at line 72 of file OpT0FinderLogger.h.
std::ostream & flashmatch::logger::send | ( | const msg::Level_t | level | ) | const |
Formatted message (simplest)
Definition at line 11 of file OpT0FinderLogger.cxx.
std::ostream & flashmatch::logger::send | ( | const msg::Level_t | level, |
const std::string & | function | ||
) | const |
Formatted message (function name included)
Definition at line 18 of file OpT0FinderLogger.cxx.
std::ostream & flashmatch::logger::send | ( | const msg::Level_t | level, |
const std::string & | function, | ||
const unsigned int | line_num | ||
) | const |
Formatted message (function name + line number)
Definition at line 26 of file OpT0FinderLogger.cxx.
std::ostream & flashmatch::logger::send | ( | const msg::Level_t | level, |
const std::string & | function, | ||
const unsigned int | line_num, | ||
const std::string & | file_name | ||
) | const |
Formatted message (function name + line number + file name)
Definition at line 35 of file OpT0FinderLogger.cxx.
|
inline |
Verbosity level setter.
Definition at line 66 of file OpT0FinderLogger.h.
|
inline |
Definition at line 108 of file OpT0FinderLogger.h.
|
private |
Level.
Definition at line 49 of file OpT0FinderLogger.h.
|
staticprivate |
Default logger level.
Definition at line 58 of file OpT0FinderLogger.h.
|
staticprivate |
Set of loggers.
Definition at line 55 of file OpT0FinderLogger.h.
|
private |
Name.
Definition at line 52 of file OpT0FinderLogger.h.
|
private |
ostream
Definition at line 41 of file OpT0FinderLogger.h.