LogManager Class Reference

Collaboration diagram for LogManager:

Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void setRepositorySelector (spi::RepositorySelectorPtr selector, void *guard)
static LoggerPtr getRootLogger ()
static LoggerPtr getLogger (const String &name)
static LoggerPtr getLogger (const String &name, spi::LoggerFactoryPtr factory)
static void shutdown ()
static void resetConfiguration ()


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

void 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.

LoggerPtr getRootLogger (  )  [static]

Retrieve the appropriate root logger.

LoggerPtr getLogger ( const String &  name  )  [static]

Retrieve the appropriate Logger instance.

Retrieve the appropriate Logger instance.

LoggerPtr getLogger ( const String &  name,
spi::LoggerFactoryPtr  factory 
) [static]

Retrieve the appropriate Logger instance.

Retrieve the appropriate Logger instance.

void shutdown (  )  [static]

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

void resetConfiguration (  )  [static]

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


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

Generated on Mon May 26 17:02:48 2008 for log4cxx by  doxygen 1.5.5