Logger factory

Description

Logger factory plugs into the container using component customization mechanism, and provides components that declare a dependency on a DNA Logger (using a org.jcontainer.dna.Logger component parameter) with an initialized and ready to go logger instance.

The default implementation creates Log4j loggers, but it can be easily extended to work with any other type of logger compatible with DNA.

The LoggerFactory component has the ability to transparently replce the logger used by a component with another logger. (This is done using Pico's ImplementationHidingComponentAdapter). This might be useful for run-time administraiton, especially in case of Logger objects that are immutable.

Browse

Dependencies

required components none
required libraries Log4j (log4j), DNA API (dna:dna-api), PicoContainer (picocontainer)

Constructor parameters

position type descritpion
1 org.picocontainer.MutablePicoContainer the container where CustomzizedComponentAdapter for DNA Logger should be installed.