log4cplus_LogLevelManager(3)

log4cplus::LogLevelManager(3) log4cplus log4cplus::LogLevelManager(3)

NAME

log4cplus::LogLevelManager - This class is used to 'manage' LogLevel definitions.

SYNOPSIS

#include <loglevel.h>

Public Member Functions


LogLevelManager ()
~LogLevelManager ()
const log4cplus::tstring & toString (LogLevel ll) const
This method is called by all Layout classes to convert a LogLevel into a string. LogLevel fromString (const log4cplus::tstring &arg) const
This method is called by all classes internally to log4cplus to convert a string into a LogLevel. void pushToStringMethod (LogLevelToStringMethod newToString)
When creating a 'derived' LogLevel, a LogLevelToStringMethod should be defined and registered with the LogLevelManager by calling this method. void pushFromStringMethod (StringToLogLevelMethod newFromString)
When creating a 'derived' LogLevel, a StringToLogLevelMethod should be defined and registered with the LogLevelManager by calling this method.

Detailed Description

This class is used to 'manage' LogLevel definitions.

This class is also how 'derived' LogLevels are created. Here are the steps to creating a 'derived' LogLevel:

1.
Create a LogLevel constant (greater than 0)
2.
Define a string to represent that constant
3.
Implement a LogLevelToStringMethod method.
4.
Implement a StringToLogLevelMethod method.
5.
create a 'static initializer' that registers those 2 methods with the LogLevelManager singleton.

Definition at line 130 of file loglevel.h.

Constructor & Destructor Documentation

log4cplus::LogLevelManager::LogLevelManager ()

log4cplus::LogLevelManager::~LogLevelManager ()

Member Function Documentation

LogLevel log4cplus::LogLevelManager::fromString (const log4cplus::tstring & arg) const

This method is called by all classes internally to log4cplus to convert a string into a LogLevel. Note: It traverses the list of StringToLogLevelMethod to do this, so all 'derived' LogLevels are recognized as well.

void log4cplus::LogLevelManager::pushFromStringMethod (StringToLogLevelMethod newFromString)

When creating a 'derived' LogLevel, a StringToLogLevelMethod should be defined and registered with the LogLevelManager by calling this method.

See also

pushToStringMethod

Referenced by log4cplus::internal::CustomLogLevelManager::add().

void log4cplus::LogLevelManager::pushToStringMethod (LogLevelToStringMethod newToString)

When creating a 'derived' LogLevel, a LogLevelToStringMethod should be defined and registered with the LogLevelManager by calling this method.

See also

pushFromStringMethod

Referenced by log4cplus::internal::CustomLogLevelManager::add().

const log4cplus::tstring& log4cplus::LogLevelManager::toString (LogLevel ll) const

This method is called by all Layout classes to convert a LogLevel into a string. Note: It traverses the list of LogLevelToStringMethod to do this, so all 'derived' LogLevels are recognized as well.

Author

Generated automatically by Doxygen for log4cplus from the source code.

Fri Jun 18 2021 Version 2.0.6