#include <loggingHandler.h>


Public Types | |
| typedef Loki::SmartPtr < Handler, Loki::RefCountedMTAdj < Loki::ObjectLevelLockable > ::RefCountedMT, Loki::AllowConversion, Loki::NoCheck, Loki::DefaultSPStorage > | HandlerSmartPtr |
| Handler smart pointer. | |
Public Member Functions | |
| virtual | ~Handler () |
| Priority | getLevel () const |
| void | setLevel (Priority priority) |
| virtual void | setLevels (Priority remotePriority, Priority localPriority, int type) |
| int | getRemoteLevel () |
| int | getLocalLevel () |
| void | setRemoteLevel (Priority remotePriority) |
| void | setLocalLevel (Priority localPriority) |
| void | setRemoteLevelType (int type) |
| void | setLocalLevelType (int type) |
| int | getRemoteLevelType () |
| int | getLocalLevelType () |
Private Attributes | |
| Priority | priority_m |
| Priority | localPriority_m |
| int | priority_type_local_m |
| int | priority_type_remote_m |
| Priority | remotePriority_m |
A Handler object takes log messages from a Logger and exports them. It might for example, write them to a console or write them to a file, or send them to a network logging service, or forward them to an OS log, or whatever. A Handler can filter out certain log messages by using the setLevel method. This class is abstract as the developer must implement the log and getName methods inherited from BaseLog.
| typedef Loki::SmartPtr<Handler, Loki::RefCountedMTAdj<Loki::ObjectLevelLockable>::RefCountedMT, Loki::AllowConversion, Loki::NoCheck, Loki::DefaultSPStorage> Logging::Handler::HandlerSmartPtr |
Handler smart pointer.
| virtual Logging::Handler::~Handler | ( | ) | [virtual] |
Destructor
| Priority Logging::Handler::getLevel | ( | ) | const [inline] |
Get the log level specifying which messages will be logged by this Handler. Message levels lower than this level will be discarded.
References priority_m.
| int Logging::Handler::getLocalLevel | ( | ) | [inline] |
References localPriority_m.
| int Logging::Handler::getLocalLevelType | ( | ) | [inline] |
References priority_type_local_m.
| int Logging::Handler::getRemoteLevel | ( | ) | [inline] |
References remotePriority_m.
| int Logging::Handler::getRemoteLevelType | ( | ) | [inline] |
References priority_type_remote_m.
| void Logging::Handler::setLevel | ( | Priority | priority | ) | [inline] |
By utilizing setLevel, one can filter out log messages entirely based on their priority. For example, calling setLevel(DEBUG) on a Handler would imply log messages with a lower priority such as TRACE would never be passed to the publish method.
| priority | New priority for this Handler |
References priority_m.
Referenced by setLevels().
| virtual void Logging::Handler::setLevels | ( | Priority | remotePriority, | |
| Priority | localPriority, | |||
| int | type | |||
| ) | [inline, virtual] |
Set levels for local and remote logging. It depends on the handler implementation (does it support only loca/remote or both) to handle the level. Default implementation sets localPriority.
Reimplemented in Logging::LogSvcHandler.
References setLevel().
| void Logging::Handler::setLocalLevel | ( | Priority | localPriority | ) | [inline] |
References localPriority_m.
| void Logging::Handler::setLocalLevelType | ( | int | type | ) | [inline] |
References priority_type_local_m.
| void Logging::Handler::setRemoteLevel | ( | Priority | remotePriority | ) | [inline] |
References remotePriority_m.
| void Logging::Handler::setRemoteLevelType | ( | int | type | ) | [inline] |
References priority_type_remote_m.
Priority Logging::Handler::localPriority_m [private] |
Local (stdout) priority.
Referenced by getLocalLevel(), and setLocalLevel().
Priority Logging::Handler::priority_m [private] |
Current priority that needs to be met before log messages are
sent to the publish method.
Referenced by getLevel(), and setLevel().
int Logging::Handler::priority_type_local_m [private] |
Referenced by getLocalLevelType(), and setLocalLevelType().
int Logging::Handler::priority_type_remote_m [private] |
Referenced by getRemoteLevelType(), and setRemoteLevelType().
Priority Logging::Handler::remotePriority_m [private] |
Remote priority.
Referenced by getRemoteLevel(), and setRemoteLevel().
1.7.0