Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Logging::Handler Class Reference

#include <loggingHandler.h>

Inheritance diagram for Logging::Handler:

Inheritance graph
[legend]
Collaboration diagram for Logging::Handler:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

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.


Member Typedef Documentation

typedef Loki::SmartPtr<Handler, Loki::RefCountedMTAdj<Loki::ObjectLevelLockable>::RefCountedMT, Loki::AllowConversion, Loki::NoCheck, Loki::DefaultSPStorage> Logging::Handler::HandlerSmartPtr
 

Handler smart pointer.


Constructor & Destructor Documentation

virtual Logging::Handler::~Handler  )  [virtual]
 

Destructor


Member Function Documentation

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.

Returns:
Current log level for this Handler.

int Logging::Handler::getLocalLevel  )  [inline]
 

int Logging::Handler::getLocalLevelType  )  [inline]
 

int Logging::Handler::getRemoteLevel  )  [inline]
 

int Logging::Handler::getRemoteLevelType  )  [inline]
 

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.

Parameters:
priority New priority for this Handler
Returns:
void

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.

See also:
setLevel()
Returns:
void

Reimplemented in Logging::LogSvcHandler.

void Logging::Handler::setLocalLevel Priority  localPriority  )  [inline]
 

void Logging::Handler::setLocalLevelType int  type  )  [inline]
 

void Logging::Handler::setRemoteLevel Priority  remotePriority  )  [inline]
 

void Logging::Handler::setRemoteLevelType int  type  )  [inline]
 


Member Data Documentation

Priority Logging::Handler::localPriority_m [private]
 

Local (stdout) priority.

Priority Logging::Handler::priority_m [private]
 

Current priority that needs to be met before log messages are

sent to the publish method.

int Logging::Handler::priority_type_local_m [private]
 

int Logging::Handler::priority_type_remote_m [private]
 

Priority Logging::Handler::remotePriority_m [private]
 

Remote priority.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:37:27 2009 for ACS C++ API by doxygen 1.3.8