DCMTK  Version 3.6.1 20121102
OFFIS DICOM Toolkit
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
dcmtk::log4cplus::spi::RootLogger Class Reference

RootLogger sits at the top of the logger hierachy. More...

+ Inheritance diagram for dcmtk::log4cplus::spi::RootLogger:
+ Collaboration diagram for dcmtk::log4cplus::spi::RootLogger:

Public Member Functions

 RootLogger (Hierarchy &h, LogLevel ll)
 The root logger names itself as "root". More...
 
virtual LogLevel getChainedLogLevel () const
 Return the assigned LogLevel value without walking the logger hierarchy.
 
void setLogLevel (LogLevel ll)
 Setting a NOT_SET_LOG_LEVEL value to the LogLevel of the root logger may have catastrophic results. More...
 
- Public Member Functions inherited from dcmtk::log4cplus::spi::LoggerImpl
virtual void callAppenders (const InternalLoggingEvent &event)
 Call the appenders in the hierrachy starting at this. More...
 
virtual void closeNestedAppenders ()
 Close all attached appenders implementing the AppenderAttachable interface.
 
virtual bool isEnabledFor (LogLevel ll) const
 Check whether this logger is enabled for a given LogLevel passed as parameter. More...
 
virtual void log (LogLevel ll, const tstring &message, const char *file=NULL, int line=-1, const char *function=NULL)
 This generic form is intended to be used by wrappers.
 
LogLevel getLogLevel () const
 Returns the assigned LogLevel, if any, for this Logger. More...
 
void setLogLevel (LogLevel _ll)
 Set the LogLevel of this Logger.
 
virtual HierarchygetHierarchy () const
 Return the the Hierarchy where this Logger instance is attached.
 
tstring getName () const
 Return the logger name.
 
bool getAdditivity () const
 Get the additivity flag for this Logger instance.
 
void setAdditivity (bool additive)
 Set the additivity flag for this Logger instance.
 
- Public Member Functions inherited from dcmtk::log4cplus::helpers::SharedObject
void addReference () const
 
void removeReference () const
 
- Public Member Functions inherited from dcmtk::log4cplus::helpers::AppenderAttachableImpl
virtual void addAppender (SharedAppenderPtr newAppender)
 Add an appender. More...
 
virtual SharedAppenderPtrList getAllAppenders ()
 Get all previously added appenders as an vectory.
 
virtual SharedAppenderPtr getAppender (const tstring &name)
 Look for an attached appender named as name. More...
 
virtual void removeAllAppenders ()
 Remove all previously added appenders.
 
virtual void removeAppender (SharedAppenderPtr appender)
 Remove the appender passed as parameter from the list of appenders.
 
virtual void removeAppender (const tstring &name)
 Remove the appender with the name passed as parameter from the list of appenders.
 
int appendLoopOnAppenders (const spi::InternalLoggingEvent &event) const
 Call the doAppend method on all attached appenders.
 

Additional Inherited Members

- Public Types inherited from dcmtk::log4cplus::spi::LoggerImpl
typedef
helpers::SharedObjectPtr
< LoggerImpl
SharedLoggerImplPtr
 
- Public Attributes inherited from dcmtk::log4cplus::helpers::SharedObject
DCMTK_LOG4CPLUS_MUTEX_PTR_DECLARE access_mutex
 
- Public Attributes inherited from dcmtk::log4cplus::helpers::AppenderAttachableImpl
DCMTK_LOG4CPLUS_MUTEX_PTR_DECLARE appender_list_mutex
 
- Protected Types inherited from dcmtk::log4cplus::helpers::AppenderAttachableImpl
typedef OFList< SharedAppenderPtrListType
 
- Protected Member Functions inherited from dcmtk::log4cplus::spi::LoggerImpl
 LoggerImpl (const tstring &name, Hierarchy &h)
 This constructor created a new Logger instance and sets its name. More...
 
virtual void forcedLog (LogLevel ll, const tstring &message, const char *file=NULL, int line=-1, const char *function=NULL)
 This method creates a new logging event and logs the event without further checks.
 
- Protected Attributes inherited from dcmtk::log4cplus::spi::LoggerImpl
tstring name
 The name of this logger.
 
LogLevel ll
 The assigned LogLevel of this logger.
 
SharedLoggerImplPtr parent
 The parent of this logger. More...
 
bool additive
 Additivity is set to true by default, that is children inherit the appenders of their ancestors by default. More...
 

Detailed Description

RootLogger sits at the top of the logger hierachy.

It is a regular logger except that it provides several guarantees.

First, it cannot be assigned a NOT_SET_LOG_LEVEL LogLevel. Second, since root logger cannot have a parent, the getChainedLogLevel method always returns the value of the ll field without walking the hierarchy.

Constructor & Destructor Documentation

dcmtk::log4cplus::spi::RootLogger::RootLogger ( Hierarchy h,
LogLevel  ll 
)

The root logger names itself as "root".

However, the root logger cannot be retrieved by name.

Member Function Documentation

void dcmtk::log4cplus::spi::RootLogger::setLogLevel ( LogLevel  ll)

Setting a NOT_SET_LOG_LEVEL value to the LogLevel of the root logger may have catastrophic results.

We prevent this here.


The documentation for this class was generated from the following file:


Generated on Wed Sep 4 2013 for DCMTK Version 3.6.1 20121102 by Doxygen 1.8.4