Apache log4cxx  Version 0.12.0
log4cxx::LogManager Class Reference

Use the LogManager class to retreive Logger instances or to operate on the current LoggerRepository. More...

#include <logmanager.h>

Static Public Member Functions

static void setRepositorySelector (spi::RepositorySelectorPtr selector, void *guard)
 Sets LoggerFactory but only if the correct guard is passed as parameter. More...
 
static spi::LoggerRepositoryPtr getLoggerRepository ()
 
static LoggerPtr getRootLogger ()
 Retrieve the appropriate root logger. More...
 
static LoggerPtr getLogger (const std::string &name)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr getLogger (const std::string &name, const spi::LoggerFactoryPtr &factory)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr exists (const std::string &name)
 Determines if logger name exists in the hierarchy. More...
 
static LoggerPtr getLogger (const std::wstring &name)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr getLogger (const std::wstring &name, const spi::LoggerFactoryPtr &factory)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr exists (const std::wstring &name)
 Determines if logger name exists in the hierarchy. More...
 
static LoggerPtr getLogger (const std::basic_string< UniChar > &name)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr getLogger (const std::basic_string< UniChar > &name, const spi::LoggerFactoryPtr &factory)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr exists (const std::basic_string< UniChar > &name)
 Determines if logger name exists in the hierarchy. More...
 
static LoggerPtr getLogger (const CFStringRef &name)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr getLogger (const CFStringRef &name, const spi::LoggerFactoryPtr &factory)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr exists (const CFStringRef &name)
 Determines if logger name exists in the hierarchy. More...
 
static LoggerPtr getLoggerLS (const LogString &name)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr getLoggerLS (const LogString &name, const spi::LoggerFactoryPtr &factory)
 Retrieve the appropriate Logger instance. More...
 
static LoggerPtr existsLS (const LogString &name)
 Determines if logger name exists in the hierarchy. More...
 
static LoggerList getCurrentLoggers ()
 
static void shutdown ()
 Safely close and remove all appenders in all loggers including the root logger. More...
 
static void resetConfiguration ()
 Reset all values contained in this current LoggerRepository to their default. More...
 

Detailed Description

Use the LogManager class to retreive Logger instances or to operate on the current LoggerRepository.

When the LogManager class is loaded into memory the default initialization procedure is inititated.

Member Function Documentation

◆ exists() [1/4]

static LoggerPtr log4cxx::LogManager::exists ( const std::string &  name)
static

Determines if logger name exists in the hierarchy.

Parameters
namelogger name.
Returns
true if logger exists.

◆ exists() [2/4]

static LoggerPtr log4cxx::LogManager::exists ( const std::wstring &  name)
static

Determines if logger name exists in the hierarchy.

Parameters
namelogger name.
Returns
true if logger exists.

◆ exists() [3/4]

static LoggerPtr log4cxx::LogManager::exists ( const std::basic_string< UniChar > &  name)
static

Determines if logger name exists in the hierarchy.

Parameters
namelogger name.
Returns
true if logger exists.

◆ exists() [4/4]

static LoggerPtr log4cxx::LogManager::exists ( const CFStringRef name)
static

Determines if logger name exists in the hierarchy.

Parameters
namelogger name.
Returns
true if logger exists.

◆ existsLS()

static LoggerPtr log4cxx::LogManager::existsLS ( const LogString name)
static

Determines if logger name exists in the hierarchy.

Parameters
namelogger name.
Returns
true if logger exists.

◆ getCurrentLoggers()

static LoggerList log4cxx::LogManager::getCurrentLoggers ( )
static

◆ getLogger() [1/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const std::string &  name)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name in current encoding.
Returns
logger.

◆ getLogger() [2/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const std::string &  name,
const spi::LoggerFactoryPtr factory 
)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name in current encoding.
factorylogger factory.
Returns
logger.

◆ getLogger() [3/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const std::wstring &  name)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
Returns
logger.

◆ getLogger() [4/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const std::wstring &  name,
const spi::LoggerFactoryPtr factory 
)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
factorylogger factory.
Returns
logger.

◆ getLogger() [5/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const std::basic_string< UniChar > &  name)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
Returns
logger.

◆ getLogger() [6/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const std::basic_string< UniChar > &  name,
const spi::LoggerFactoryPtr factory 
)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
factorylogger factory.
Returns
logger.

◆ getLogger() [7/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const CFStringRef name)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
Returns
logger.

◆ getLogger() [8/8]

static LoggerPtr log4cxx::LogManager::getLogger ( const CFStringRef name,
const spi::LoggerFactoryPtr factory 
)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
factorylogger factory.
Returns
logger.

◆ getLoggerLS() [1/2]

static LoggerPtr log4cxx::LogManager::getLoggerLS ( const LogString name)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
Returns
logger.

◆ getLoggerLS() [2/2]

static LoggerPtr log4cxx::LogManager::getLoggerLS ( const LogString name,
const spi::LoggerFactoryPtr factory 
)
static

Retrieve the appropriate Logger instance.

Parameters
namelogger name.
factorylogger factory.
Returns
logger.

◆ getLoggerRepository()

static spi::LoggerRepositoryPtr log4cxx::LogManager::getLoggerRepository ( )
static

◆ getRootLogger()

static LoggerPtr log4cxx::LogManager::getRootLogger ( )
static

Retrieve the appropriate root logger.

◆ resetConfiguration()

static void log4cxx::LogManager::resetConfiguration ( )
static

Reset all values contained in this current LoggerRepository to their default.

◆ setRepositorySelector()

static void log4cxx::LogManager::setRepositorySelector ( spi::RepositorySelectorPtr  selector,
void *  guard 
)
static

Sets LoggerFactory but only if the correct guard is passed as parameter.

Initally the guard is null. If the guard is null, then invoking this method sets the logger factory and the guard. Following invocations will throw a IllegalArgumentException, unless the previously set guard is passed as the second parameter.

This allows a high-level component to set the RepositorySelector used by the LogManager.

◆ shutdown()

static void log4cxx::LogManager::shutdown ( )
static

Safely close and remove all appenders in all loggers including the root logger.


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