org.jlog2
Class CustomLoggerFactory
java.lang.Object
org.jlog2.LoggerFactory
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.
Method Summary |
protected java.util.Vector |
getDebugChannels(java.lang.String loggerID)
Create and store any new debug channels associated with the new log id. |
protected java.util.Vector |
getLogChannels(java.lang.String loggerID)
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomLoggerFactory
public CustomLoggerFactory()
throws java.lang.Exception
- Creates a new instance of CustomLoggerFactory.
- Throws:
java.lang.Exception
- any error.
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(java.lang.String loggerID)
- Create and store any new log channels associated with the new log id.
- Specified by:
getLogChannels
in class LoggerFactory
- Parameters:
loggerID
- the id to identify one logger from another.
- Returns:
- a list of all log channels associated with the logger.
This default implementation only adds the default channels created
at initialisation time for all loggers.
getDebugChannels
protected java.util.Vector getDebugChannels(java.lang.String loggerID)
- Create and store any new debug channels associated with the new log id.
- Specified by:
getDebugChannels
in class LoggerFactory
- Parameters:
loggerID
- the id to identify one logger from another.
- Returns:
- a list of all debug channels associated with the logger.
This default implementation only adds the default channels created
at initialisation time for all loggers.