org.apache.ws.jaxme.logging

Class LoggerFactoryImpl

Implemented Interfaces:
LoggerFactory
Known Direct Subclasses:
AntProjectLoggerFactory, JavaUtilLoggerFactory, Log4jLoggerFactory

public abstract class LoggerFactoryImpl
extends java.lang.Object
implements LoggerFactory

Default implementation of a LoggerFactory. The default implementation holds an internal Map of Loggers.
Author:
Jochen Wiedmann

Method Summary

Logger
getLogger(String pName)
Returns a Logger with the name pName.
abstract Logger
newLogger(String pName)
Creates a new Logger with the given name.

Method Details

getLogger

public Logger getLogger(String pName)
Returns a Logger with the name pName. If the internal Map of loggers already contains a Logger with name pName, returns that one. Otherwise creates a new instance by calling newLogger(String), stores the instance in the internal Map and returns it.
Specified by:
getLogger in interface LoggerFactory

newLogger

public abstract Logger newLogger(String pName)
Creates a new Logger with the given name. The logger will be added to an internal Map and the next call to getLogger(String) with the same name will return this Logger.