#include <DebugFunctions.h>
Public Types | |
| typedef Log &(*) | manip_t (Log &) |
| typedef std::ostream &(*) | std_manip_t (std::ostream &) |
| OFF = 0 | |
| DEBUG | |
| INFO | |
| WARN | |
| ERROR | |
| FATAL | |
| enum | Level { OFF = 0, DEBUG, INFO, WARN, ERROR, FATAL } |
Public Member Functions | |
| Log () | |
| Construct a logging object with the root logger. | |
| Log (const char *logger) | |
| Construct a logging object with the named logger. | |
| ~Log () | |
| void | setLevel (Level l) |
| void | writeLog () |
| Write logging information to the logfile. | |
| Log & | operator() (Level l) |
| set the log level of this logger | |
| template<typename T> | |
| Log & | operator<< (const T &rhs) |
| Send data to be logged to this logger. | |
| Log & | operator<< (manip_t manip) |
| Log & | operator<< (std_manip_t manip) |
Static Public Member Functions | |
| static Log & | write (Log &l) |
| Manipulator used to write contents of logger to target. | |
Private Member Functions | |
| bool | enabled () |
Private Attributes | |
| void * | m_logger |
| Level | m_level |
| std::ostringstream | m_oss |
| typedef Log&(*) Log::manip_t(Log &) |
| typedef std::ostream&(*) Log::std_manip_t(std::ostream &) |
| enum Log::Level |
| Log::Log | ( | ) |
Construct a logging object with the root logger.
| Log::Log | ( | const char * | logger | ) |
Construct a logging object with the named logger.
| Log::~Log | ( | ) |
| bool Log::enabled | ( | ) | [private] |
| Log& Log::operator<< | ( | std_manip_t | manip | ) | [inline] |
| Log& Log::operator<< | ( | const T & | rhs | ) | [inline] |
Send data to be logged to this logger.
T must have a working operator<<(std::ostream&, const T &). No data is actually sent to the logger until the manipulator Log::write is found or the writeLog() function is called.
| void Log::setLevel | ( | Level | l | ) | [inline] |
Manipulator used to write contents of logger to target.
| void Log::writeLog | ( | ) |
Write logging information to the logfile.
Level Log::m_level [private] |
void* Log::m_logger [private] |
std::ostringstream Log::m_oss [private] |
1.4.7