LoggerStore

LoggerStore is a component for storing a DNA Logger hierarchy, abstracting the underlying logger implementation and configuration mechanism. LoggerStore currently supports three different logging implementations:

  • Avalon LogKit
  • Jakarta Log4J
  • Sun JDK 1.4 logging (java.util.logging)
The DNA Logger interface provides a high-level abstraction which supports COP (Component Oriented Programming) - see the DNA project for more details.

LoggerStore is an interface with concrete implementations for each of the underlying logging systems. The interface has the following methods:

		
Logger getLogger() throws Exception;

Logger getLogger( final String categoryName ) throws Exception;

void close();
		
The first two methods allow the user to retrieve the root Logger and the Logger for a given logging category. Whenever an application has finished using the LoggerStore it will call the close() method indicating that the logger hierarchy should also be shutdown.

LoggerStoreFactory

Each LoggerStore has one or more associated LoggerStoreFactory which also acts as a configurator for the Logger:

		
LoggerStore createLoggerStore( Map config ) throws Exception;
		
where the Map contains the parameters for the configuration of the store.

Configuration

There are several ways to configure the LoggerStore. Click here for more.