org.apache.avalon.framework.logger
Class AbstractLoggable

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLoggable

Deprecated. Use AbstractLogEnabled instead.

public abstract class AbstractLoggable
extends java.lang.Object

Utility class to allow construction of easy components that will perform logging.

Version:
$Id: AbstractLoggable.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
Author:
Avalon Development Team

Field Summary
private  org.apache.log.Logger m_logger
          Deprecated.  
 
Constructor Summary
AbstractLoggable()
          Deprecated.  
 
Method Summary
protected  org.apache.log.Logger getLogger()
          Deprecated. Helper method to allow sub-classes to aquire logger.
 void setLogger(org.apache.log.Logger logger)
          Deprecated. Set the components logger.
protected  void setupLogger(java.lang.Object component)
          Deprecated. Helper method to setup other components with same logger.
protected  void setupLogger(java.lang.Object component, org.apache.log.Logger logger)
          Deprecated. Helper method to setup other components with logger.
protected  void setupLogger(java.lang.Object component, java.lang.String subCategory)
          Deprecated. Helper method to setup other components with logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_logger

private org.apache.log.Logger m_logger
Deprecated. 
Constructor Detail

AbstractLoggable

public AbstractLoggable()
Deprecated. 
Method Detail

setLogger

public void setLogger(org.apache.log.Logger logger)
Deprecated. 
Set the components logger.

Parameters:
logger - the logger

getLogger

protected final org.apache.log.Logger getLogger()
Deprecated. 
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.

Returns:
the Logger

setupLogger

protected void setupLogger(java.lang.Object component)
Deprecated. 
Helper method to setup other components with same logger.

Parameters:
component - the component to pass logger object to

setupLogger

protected void setupLogger(java.lang.Object component,
                           java.lang.String subCategory)
Deprecated. 
Helper method to setup other components with logger. The logger has the subcategory of this components logger.

Parameters:
component - the component to pass logger object to
subCategory - the subcategory to use (may be null)

setupLogger

protected void setupLogger(java.lang.Object component,
                           org.apache.log.Logger logger)
Deprecated. 
Helper method to setup other components with logger.

Parameters:
component - the component to pass logger object to
logger - the Logger