Kea  2.1.7-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

◆ LoggerManagerImpl()

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


Definition at line 46 of file logger_manager_impl.h.

References isc::log::INFO, and isc::asiodns::logger.

Member Function Documentation

◆ init()

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 206 of file

◆ processEnd()

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

End Processing.

Terminates the processing of the logging specifications.

Definition at line 57 of file

◆ processInit()

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 48 of file

◆ processSpecification()

◆ reset()

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 226 of file

References isc::data::copy(), isc::log::internal::BufferAppender::flush(), isc::log::getRootLoggerName(), and isc_throw_assert.

+ Here is the call graph for this function:

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