Kea  1.9.9-git
isc::log::LoggerManagerImpl Class Reference

Logger Manager Implementation. More...

#include <logger_manager_impl.h>

Public Member Functions

 LoggerManagerImpl ()
 Constructor. More...
void processEnd ()
 End Processing. More...
void processInit ()
 Initialize Processing. More...

Static Public Member Functions

static void init (isc::log::Severity severity=isc::log::INFO, int dbglevel=0, bool buffer=false)
 Implementation-specific initialization. More...
static void processSpecification (const LoggerSpecification &spec)
 Process Specification. More...
static void reset (isc::log::Severity severity=isc::log::INFO, int dbglevel=0)
 Reset logging. More...

Detailed Description

Logger Manager Implementation.

This is the implementation of the logger manager for the log4cplus underlying logger.

As noted in logger_manager.h, the logger manager class exists to set up the logging given a set of specifications. This class handles the processing of those specifications.

Note: the logging has been implemented using a "pimpl" idiom to conceal the underlying implementation (log4cplus) from the Kea interface. This requires that there be an implementation class, even though in this case, all the implementation class methods can be declared static.

Definition at line 42 of file logger_manager_impl.h.

Constructor & Destructor Documentation

isc::log::LoggerManagerImpl::LoggerManagerImpl ( )


Definition at line 46 of file logger_manager_impl.h.

Member Function Documentation

void isc::log::LoggerManagerImpl::init ( isc::log::Severity  severity = isc::log::INFO,
int  dbglevel = 0,
bool  buffer = false 

Implementation-specific initialization.

Sets the basic configuration for logging (the root logger has INFO and more severe messages routed to stdout). Unless this function (or process() with a valid specification for all loggers that will log messages) is called before a message is logged, log4cplus will output a message to stderr noting that logging has not been initialized.

It is assumed here that the name of the Kea root logger can be obtained from the global function getRootLoggerName().

severitySeverity to be associated with this logger
dbglevelDebug level associated with the root logger
bufferIf true, all log messages will be buffered until one of the process() methods is called. If false, initial logging shall go to the default output (i.e. stdout)

Definition at line 186 of file

void isc::log::LoggerManagerImpl::processEnd ( )

End Processing.

Terminates the processing of the logging specifications.

Definition at line 56 of file

void isc::log::LoggerManagerImpl::processInit ( )

Initialize Processing.

This resets the hierarchy of loggers back to their defaults. This means that all non-root loggers (if they exist) are set to NOT_SET, and the root logger reset to logging informational messages.

Definition at line 47 of file

void isc::log::LoggerManagerImpl::processSpecification ( const LoggerSpecification spec)
void isc::log::LoggerManagerImpl::reset ( isc::log::Severity  severity = isc::log::INFO,
int  dbglevel = 0 

Reset logging.

Resets to default configuration (root logger logging to the console with INFO severity).

severitySeverity to be associated with this logger
dbglevelDebug level associated with the root logger

Definition at line 206 of file

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