#include <Logger.h>
Public Types | |
enum | logLevels { ERROR_LEV, EXCEPTION, WARNING, INFO, DETAIL } |
Public Member Functions | |
std::ostream & | entry (enum logLevels level, const char *file=0, int line=-1) |
void | hookFatalSignals () |
void | setEnabled (bool enabled) |
void | setLevel (enum logLevels newLevel) |
void | setStream (std::ostream *stream) |
Static Public Member Functions | |
static Logger & | instance () |
Static Public Attributes | |
static const char * | levelNames [] = {"ERROR", "EXCEPTION", "WARNING", "INFO", "DETAIL"} |
Private Member Functions | |
void | close () |
Logger () | |
~Logger () | |
Private Attributes | |
bool | enabled |
int | level |
std::ofstream * | nullStream |
std::ostream * | stream |
Friends | |
void | loggerTermHandler (int signal) |
clearpath::Logger::Logger | ( | ) | [private] |
Definition at line 82 of file Logger.cpp.
clearpath::Logger::~Logger | ( | ) | [private] |
Definition at line 90 of file Logger.cpp.
void clearpath::Logger::close | ( | ) | [private] |
Definition at line 95 of file Logger.cpp.
std::ostream & clearpath::Logger::entry | ( | enum logLevels | level, |
const char * | file = 0 , |
||
int | line = -1 |
||
) |
Definition at line 105 of file Logger.cpp.
void clearpath::Logger::hookFatalSignals | ( | ) |
Definition at line 143 of file Logger.cpp.
Logger & clearpath::Logger::instance | ( | ) | [static] |
Definition at line 76 of file Logger.cpp.
void clearpath::Logger::setEnabled | ( | bool | enabled | ) |
Definition at line 127 of file Logger.cpp.
void clearpath::Logger::setLevel | ( | enum logLevels | newLevel | ) |
Definition at line 132 of file Logger.cpp.
void clearpath::Logger::setStream | ( | std::ostream * | stream | ) |
Definition at line 137 of file Logger.cpp.
void loggerTermHandler | ( | int | signal | ) | [friend] |
bool clearpath::Logger::enabled [private] |
int clearpath::Logger::level [private] |
const char * clearpath::Logger::levelNames = {"ERROR", "EXCEPTION", "WARNING", "INFO", "DETAIL"} [static] |
std::ofstream* clearpath::Logger::nullStream [private] |
std::ostream* clearpath::Logger::stream [private] |