#include <logserver.h>

Public Types | |
| enum | LogLevel { LL_DEBUG = (1 << 0), LL_INFO = (1 << 1), LL_WARNING = (1 << 2), LL_ERROR = (1 << 3), LL_CRITICAL = (1 << 4), LL_ALL_STD = LL_DEBUG | LL_INFO, LL_ALL_ERR = LL_WARNING | LL_ERROR | LL_CRITICAL, LL_ALL = LL_DEBUG | LL_INFO | LL_WARNING | LL_ERROR | LL_CRITICAL } |
| typedef void | LogFunction (LogLevel, const string &, int, const string &) |
Public Member Functions | |
| LogServer () | |
| virtual | ~LogServer () |
| bool | RegisterFile (File *file, int levels, bool close=false) |
| bool | RegisterFile (const string &file_path, int levels) |
| bool | RegisterFunction (LogFunction *func, int levels) |
| void | UnregisterAll () |
| void | WriteInfo (const char *file, int line, const char *message,...) |
| void | WriteWarning (const char *file, int line, const char *message,...) |
| void | WriteError (const char *file, int line, const char *message,...) |
| void | WriteCritical (const char *file, int line, const char *message,...) |
| void | WriteDebug (const char *file, int line, const char *message,...) |
Private Types | |
| typedef vector < LogEntry > | EntryArray |
| typedef EntryArray::iterator | EntryArrayIter |
Private Member Functions | |
| void | Lock () const |
| void | Unlock () const |
| void | WriteMessage (LogLevel level, const char *file, int line, const char *message, va_list args) |
Private Attributes | |
| EntryArray | entries |
| Mutex * | mutex |
Classes | |
| struct | LogEntry |
| typedef void LogServer::LogFunction(LogLevel, const string &, int, const string &) |
typedef vector<LogEntry> LogServer::EntryArray [private] |
typedef EntryArray::iterator LogServer::EntryArrayIter [private] |
| enum LogServer::LogLevel |
| LogServer::LogServer | ( | ) |
| LogServer::~LogServer | ( | ) | [virtual] |
| bool LogServer::RegisterFile | ( | File * | file, | |
| int | levels, | |||
| bool | close = false | |||
| ) |
| bool LogServer::RegisterFile | ( | const string & | file_path, | |
| int | levels | |||
| ) |
| bool LogServer::RegisterFunction | ( | LogFunction * | func, | |
| int | levels | |||
| ) |
| void LogServer::UnregisterAll | ( | ) |
| void LogServer::WriteInfo | ( | const char * | file, | |
| int | line, | |||
| const char * | message, | |||
| ... | ||||
| ) | [inline] |
| void LogServer::WriteWarning | ( | const char * | file, | |
| int | line, | |||
| const char * | message, | |||
| ... | ||||
| ) | [inline] |
| void LogServer::WriteError | ( | const char * | file, | |
| int | line, | |||
| const char * | message, | |||
| ... | ||||
| ) | [inline] |
| void LogServer::WriteCritical | ( | const char * | file, | |
| int | line, | |||
| const char * | message, | |||
| ... | ||||
| ) | [inline] |
| void LogServer::WriteDebug | ( | const char * | file, | |
| int | line, | |||
| const char * | message, | |||
| ... | ||||
| ) | [inline] |
| void LogServer::Lock | ( | ) | const [inline, private] |
| void LogServer::Unlock | ( | ) | const [inline, private] |
| void LogServer::WriteMessage | ( | LogLevel | level, | |
| const char * | file, | |||
| int | line, | |||
| const char * | message, | |||
| va_list | args | |||
| ) | [private] |
EntryArray LogServer::entries [private] |
Mutex* LogServer::mutex [private] |
1.5.3