| Kea 3.0.2-git

isc::log::LoggerManagerImpl Class Reference

Logger Manager Implementation. More...

`#include <logger_manager_impl.h>`

## Public Member Functions
| LoggerManagerImpl ()
| Constructor.
void | processEnd ()
| End Processing.
void | processInit ()
| Initialize Processing.
void | processSpecification (const LoggerSpecification &spec)
| Process Specification.

## Static Public Member Functions
static void | init (isc::log::Severity severity=isc::log::INFO, int dbglevel=0, bool buffer=false)
| Implementation-specific initialization.
static void | reset (isc::log::Severity severity=isc::log::INFO, int dbglevel=0)
| Reset logging.

## 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 | ( |  | ) |
| inline

Constructor.

Definition at line 46 of file logger_manager_impl.h.

## Member Function Documentation

## ◆ init()

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

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

Parameters

  severity | Severity to be associated with this logger
  dbglevel | Debug level associated with the root logger
  buffer | If 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 222 of file logger_manager_impl.cc.

References isc::log::LoggerLevelImpl::init().

Referenced by isc::log::LoggerManager::init().

Here is the call graph for this function:

## ◆ processEnd()

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

End Processing.

Terminates the processing of the logging specifications.

Definition at line 57 of file logger_manager_impl.cc.

## ◆ 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 logger_manager_impl.cc.

## ◆ processSpecification()

void isc::log::LoggerManagerImpl::processSpecification | ( | const LoggerSpecification & | spec | ) |

Process Specification.

Processes the specification for a single logger.

Parameters

  spec | Logging specification for this logger

Definition at line 64 of file logger_manager_impl.cc.

References isc::log::LoggerLevelImpl::convertFromBindLevel(), isc::log::expandLoggerName(), isc::log::LoggerSpecification::getAdditive(), isc::log::LoggerSpecification::getDbglevel(), isc::log::LoggerSpecification::getName(), isc::log::getRootLoggerName(), isc::log::LoggerSpecification::getSeverity(), and isc::log::LoggerSpecification::optionCount().

Here is the call graph for this function:

## ◆ reset()

void isc::log::LoggerManagerImpl::reset | ( | isc::log::Severity | severity = isc::log::INFO,
|  | int | dbglevel = 0 )
| static

Reset logging.

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

Parameters

  severity | Severity to be associated with this logger
  dbglevel | Debug level associated with the root logger

Definition at line 242 of file logger_manager_impl.cc.

Referenced by isc::log::LoggerManager::reset().

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

- logger_manager_impl.h
- logger_manager_impl.cc