#include <MsgLoggerImpl.h>
Public Member Functions | |
MsgLoggerImpl (const std::string &name) | |
~MsgLoggerImpl () | |
void | setLevel (MsgLogLevel level) |
set the logger level, messages with the level below this won't be logged | |
void | propagate (bool flag) |
define whether or not we need messages propagated to ancestors, root logger never propagates | |
void | addHandler (MsgHandler *handler) |
add a handler for the messages, takes ownership of the object | |
const std::string | name () const |
name of the logger | |
bool | logging (MsgLogLevel sev) const |
check if the specified level will log any message | |
bool | log (const MsgLogRecord &record) const |
get the stream for the specified log level | |
void | handle (MsgLogRecord &record) const |
send the message to the handles and parents | |
Static Public Member Functions | |
static MsgLoggerImpl * | getLogger (const std::string &name) |
This software was developed for the BaBar collaboration. If you use all or part of it, please give an appropriate acknowledgment.
Copyright (C) 2005 SLAC
Definition at line 79 of file MsgLoggerImpl.h.
MsgLogger::MsgLoggerImpl::MsgLoggerImpl | ( | const std::string & | name | ) |
MsgLogger::MsgLoggerImpl::~MsgLoggerImpl | ( | ) |
Definition at line 110 of file MsgLoggerImpl.cpp.
void MsgLogger::MsgLoggerImpl::addHandler | ( | MsgHandler * | handler | ) |
add a handler for the messages, takes ownership of the object
Definition at line 121 of file MsgLoggerImpl.cpp.
Referenced by initRoot().
MsgLoggerImpl * MsgLogger::MsgLoggerImpl::getLogger | ( | const std::string & | name | ) | [static] |
Definition at line 191 of file MsgLoggerImpl.cpp.
References implementations, logger, MsgLoggerImpl(), newLoggerMutex, and readConfig().
void MsgLogger::MsgLoggerImpl::handle | ( | MsgLogRecord & | record | ) | const |
send the message to the handles and parents
bool MsgLogger::MsgLoggerImpl::log | ( | const MsgLogRecord & | record | ) | const |
get the stream for the specified log level
Definition at line 161 of file MsgLoggerImpl.cpp.
References getLogger(), initRoot(), MsgLogger::MsgLogRecord::level(), log(), and parentName().
Referenced by log().
bool MsgLogger::MsgLoggerImpl::logging | ( | MsgLogLevel | sev | ) | const |
check if the specified level will log any message
Definition at line 129 of file MsgLoggerImpl.cpp.
References getLogger(), initRoot(), logging(), and parentName().
Referenced by logging().
const std::string MsgLogger::MsgLoggerImpl::name | ( | ) | const [inline] |
void MsgLogger::MsgLoggerImpl::propagate | ( | bool | flag | ) | [inline] |
define whether or not we need messages propagated to ancestors, root logger never propagates
Definition at line 99 of file MsgLoggerImpl.h.
void MsgLogger::MsgLoggerImpl::setLevel | ( | MsgLogLevel | level | ) | [inline] |
set the logger level, messages with the level below this won't be logged
Definition at line 96 of file MsgLoggerImpl.h.