This class encapsulates a basic independent log hierarchy.
The hierarchy is essentially a safe wrapper around root logger.
author: Avalon Development Team author: Peter Donald
Set the LoggerListener associated with hierarchy. This is a
unicast listener, so only one LoggerListener is allowed.
Parameters: loggerListener - the LoggerListener throws: UnsupportedOperationException - if no more LoggerListeners arepermitted.
In most cases the default LogHierarchy is the only
one used in an application. However when security is
a concern or multiple independent applications will
be running in same JVM it is advantageous to create
new Hierarchies rather than reuse default.
Utility method to retrieve logger for hierarchy.
This method is intended for use by sub-classes
which can take responsibility for manipulating
Logger directly.
the Logger
Logs an error message to error handler.
Default Error Handler is stderr.
Parameters: message - a message to log Parameters: throwable - a Throwable to log
Logs an error message to error handler.
Default Error Handler is stderr.
Parameters: message - a message to log
removeLoggerListener
public synchronized void removeLoggerListener(LoggerListener loggerListener)(Code)
Remove the LoggerListener associated with hierarchy. Perform this
step before adding a new one if you want to change it.
Parameters: loggerListener - the LoggerListener
Set the default log target for hierarchy.
This is the target inherited by loggers if no other target is specified.
Parameters: target - the default target
Set the default log targets for this hierarchy.
These are the targets inherited by loggers if no other targets are specified
Parameters: targets - the default targets
Set the default priority for hierarchy.
This is the priority inherited by loggers if no other priority is specified.
Parameters: priority - the default priority