org.jlog2
Class CustomLoggerFactory

java.lang.Object
  extended by org.jlog2.LoggerFactory
      extended by org.jlog2.CustomLoggerFactory

public class CustomLoggerFactory
extends LoggerFactory

This class is an implementation of the logger factory to return the default logger functionality. You can implement your own version instead.


Field Summary
 
Fields inherited from class org.jlog2.LoggerFactory
debugChannels, debugLevel, logChannels, logLevel, propsParser
 
Constructor Summary
CustomLoggerFactory()
          Creates a new instance of CustomLoggerFactory.
 
Method Summary
protected  java.util.Vector getDebugChannels()
          Create and store any new debug channels associated with the new log id.
protected  java.util.Vector getLogChannels()
          Create and store any new log channels associated with the new log id.
 Logger getLoggerInstance(java.lang.String loggerID)
          Create a new instance of Logger.
 
Methods inherited from class org.jlog2.LoggerFactory
getAllDebugChannels, getAllLogChannels, getDebugLevel, getInstance, getLogLevel, resetChannels, setDebugLevel, setLoggerFactory, setLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomLoggerFactory

public CustomLoggerFactory()
                    throws java.lang.Exception
Creates a new instance of CustomLoggerFactory.

Throws:
java.lang.Exception - any error.
Method Detail

getLoggerInstance

public Logger getLoggerInstance(java.lang.String loggerID)
Create a new instance of Logger. Every call creates a new instance, but the channels to write the messages to might be duplicated.

Specified by:
getLoggerInstance in class LoggerFactory
Parameters:
loggerID - the id to identify one logger from another.
Returns:
the newly created logger.

getLogChannels

protected java.util.Vector getLogChannels()
Create and store any new log channels associated with the new log id.

Specified by:
getLogChannels in class LoggerFactory
Returns:
a list of all log channels associated with the logger. This default implementation simply returns every channel that has been added and is the same as calling LoggerFactory.getAllLogChannels.

getDebugChannels

protected java.util.Vector getDebugChannels()
Create and store any new debug channels associated with the new log id.

Specified by:
getDebugChannels in class LoggerFactory
Returns:
a list of all debug channels associated with the logger. This default implementation simply returns every channel that has been added and is the same as calling LoggerFactory.getAllDebugChannels.