MsgLogger::MsgLoggerImpl Class Reference
[MsgLogger_detail]

#include <MsgLoggerImpl.h>

List of all members.

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 MsgLoggerImplgetLogger (const std::string &name)


Detailed Description

Implementation of the message logger. This class is actually an implementation detail used by the MsgLogger class. It should not be visible to clients in any way.

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:
MsgLogger

MsgHandler

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

Definition at line 79 of file MsgLoggerImpl.h.


Constructor & Destructor Documentation

MsgLogger::MsgLoggerImpl::MsgLoggerImpl ( const std::string &  name  ) 

Definition at line 100 of file MsgLoggerImpl.cpp.

Referenced by getLogger().

MsgLogger::MsgLoggerImpl::~MsgLoggerImpl (  ) 

Definition at line 110 of file MsgLoggerImpl.cpp.


Member Function Documentation

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().

Referenced by log(), and logging().

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]

name of the logger

Definition at line 105 of file MsgLoggerImpl.h.

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.


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