LogManager Class Reference

Collaboration diagram for LogManager:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

void setRepositorySelector (spi::RepositorySelectorPtr selector, void *guard)
LoggerPtr getRootLogger ()
LoggerPtr getLogger (const String &name)
LoggerPtr getLogger (const String &name, spi::LoggerFactoryPtr factory)
void shutdown ()
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

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

Retrieve the appropriate Logger instance.

LoggerPtr getLogger const String &  name  )  [static]
 

Retrieve the appropriate Logger instance.

LoggerPtr getRootLogger  )  [static]
 

Retrieve the appropriate root logger.

void resetConfiguration  )  [static]
 

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

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.

void 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 files:
  • logmanager.h
  • logmanager.cpp

Copyright © 1999-2004, Apache Software Foundation