MsgLogger::MsgLogger Class Reference
[C++ Message Logging Facility]

#include <MsgLogger.h>

List of all members.

Public Member Functions

 MsgLogger (const std::string &name="")
 ~MsgLogger ()
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
void addHandler (MsgHandler *handler)
 add a handler for the messages, takes ownership of the object
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


Detailed Description

The class for the first-level processing of the messages. The streams send messages to this class, and this class forwards them to handlers (if it decides that message is indeed to be logged.) The loggers are organized into hierarchical structure, every logger has a parent, except one root logger which does not have any parents. Every message is also sent by logger to its parent logger, unless propagate flag is clear.

Note that this class is just a kind of smart poiner class for the real objects of the class MsgLoggerImpl which do real job.

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

See also:
MsgLoggerImpl
Version:
Id
MsgLogger.h 2700 2011-12-09 21:52:07Z salnikov@SLAC.STANFORD.EDU
Author:
Andy Salnikov

Definition at line 83 of file MsgLogger.h.


Constructor & Destructor Documentation

MsgLogger::MsgLogger::MsgLogger ( const std::string &  name = ""  ) 

MsgLogger::MsgLogger::~MsgLogger (  )  [inline]

Definition at line 94 of file MsgLogger.h.


Member Function Documentation

void MsgLogger::MsgLogger::addHandler ( MsgHandler handler  ) 

add a handler for the messages, takes ownership of the object

bool MsgLogger::MsgLogger::log ( const MsgLogRecord record  )  const

get the stream for the specified log level

bool MsgLogger::MsgLogger::logging ( MsgLogLevel  sev  )  const

check if the specified level will log any message

void MsgLogger::MsgLogger::propagate ( bool  flag  ) 

define whether or not we need messages propagated to ancestors

void MsgLogger::MsgLogger::setLevel ( MsgLogLevel  level  ) 

set the logger level, messages with the level below this won't be logged


The documentation for this class was generated from the following file:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7