org.apache.avalon.framework.logger
Class AbstractLoggable
java.lang.Object
org.apache.avalon.framework.logger.AbstractLoggable
- Loggable
public abstract class AbstractLoggable
extends java.lang.Object
Utility class to allow construction of easy components that will perform logging.
Version:
- Avalon Development Team
protected org.apache.log.Logger | getLogger() - Helper method to allow sub-classes to aquire logger.
|
void | setLogger(org.apache.log.Logger logger) - Set the components logger.
|
protected void | setupLogger(Object component) - Helper method to setup other components with same logger.
|
protected void | setupLogger(Object component, String subCategory) - Helper method to setup other components with logger.
|
protected void | setupLogger(Object component, org.apache.log.Logger logger) - Helper method to setup other components with logger.
|
getLogger
protected final org.apache.log.Logger getLogger()
Helper method to allow sub-classes to aquire logger.
This method exists rather than exposing a member variable
because it protects other users against future changes. It
also means they do not have to use our naming convention.
There is no performance penalty as this is a final method
and will be inlined by the JVM.
- the Logger
setLogger
public void setLogger(org.apache.log.Logger logger)
Set the components logger.
- setLogger in interface Loggable
logger
- the logger
setupLogger
protected void setupLogger(Object component)
Helper method to setup other components with same logger.
component
- the component to pass logger object to
setupLogger
protected void setupLogger(Object component,
String subCategory)
Helper method to setup other components with logger.
The logger has the subcategory of this components logger.
component
- the component to pass logger object tosubCategory
- the subcategory to use (may be null)
setupLogger
protected void setupLogger(Object component,
org.apache.log.Logger logger)
Helper method to setup other components with logger.
component
- the component to pass logger object tologger
- the Logger
"Copyright B) 2001 Apache Jakarta Project. All Rights Reserved."