ReFRACtor
|
This is a simple logger. More...
#include <logger.h>
Public Member Functions | |
void | print (std::ostream &Os) |
std::string | print_to_string () const |
Print to string. More... | |
Static Public Member Functions | |
static LogHelper | debug () |
static LogHelper | error () |
static LogHelper | fatal () |
static LogHelper | info () |
static Logger & | instance () |
The logger instance. More... | |
static LogHelper | log (LogImp::log_level l) |
static void | set_implementation (const boost::shared_ptr< LogImp > &imp) |
Set the implementation. More... | |
static void | set_implementation (LogImp *imp) |
Set the implementation. More... | |
static std::ostream * | stream () |
Underlying stream, can be null if no underlying stream. More... | |
static LogHelper | warning () |
This is a simple logger.
The logger depends on a specific implementation being set by set_implementation. If we don't have an implementation set, then the logger doesn't do anything.
The logger is a singleton, there is just one global logger. You can directly access it through instance, but normally you just do things like "Logger::debug() << 'My debug message\n'". Data is flushed when a "\n" is encountered, you should end all messages with "\n".
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inlinestatic |
|
inline |
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |