#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) |
sawyer::Logger::Logger | ( | ) | [private] |
Definition at line 83 of file Logger.cpp.
sawyer::Logger::~Logger | ( | ) | [private] |
Definition at line 91 of file Logger.cpp.
void sawyer::Logger::close | ( | ) | [private] |
Definition at line 96 of file Logger.cpp.
std::ostream & sawyer::Logger::entry | ( | enum logLevels | level, |
const char * | file = 0 , |
||
int | line = -1 |
||
) |
Definition at line 106 of file Logger.cpp.
void sawyer::Logger::hookFatalSignals | ( | ) |
Definition at line 144 of file Logger.cpp.
Logger & sawyer::Logger::instance | ( | ) | [static] |
Definition at line 77 of file Logger.cpp.
void sawyer::Logger::setEnabled | ( | bool | enabled | ) |
Definition at line 128 of file Logger.cpp.
void sawyer::Logger::setLevel | ( | enum logLevels | newLevel | ) |
Definition at line 133 of file Logger.cpp.
void sawyer::Logger::setStream | ( | std::ostream * | stream | ) |
Definition at line 138 of file Logger.cpp.
void loggerTermHandler | ( | int | signal | ) | [friend] |
bool sawyer::Logger::enabled [private] |
int sawyer::Logger::level [private] |
const char * sawyer::Logger::levelNames = {"ERROR", "EXCEPTION", "WARNING", "INFO", "DETAIL"} [static] |
std::ofstream* sawyer::Logger::nullStream [private] |
std::ostream* sawyer::Logger::stream [private] |