org.codehaus.dna
Class AbstractLogEnabled

java.lang.Object
  extended byorg.codehaus.dna.AbstractLogEnabled
All Implemented Interfaces:
LogEnabled

public abstract class AbstractLogEnabled
extends java.lang.Object
implements LogEnabled

Abstract utility class that components can extend to make it easy to implement logging.

Version:
$Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $

Constructor Summary
AbstractLogEnabled()
           
 
Method Summary
 void enableLogging(Logger logger)
          Set the components logger.
protected  Logger getLogger()
          Return the components logger.
protected  void setupLogger(java.lang.Object object)
          Utility method to setup specified object with current components logger.
protected  void setupLogger(java.lang.Object object, java.lang.String name)
          Utility method to setup specified object with a child logger of components current logger with specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLogEnabled

public AbstractLogEnabled()
Method Detail

enableLogging

public void enableLogging(Logger logger)
Set the components logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
logger - the logger

getLogger

protected final Logger getLogger()
Return the components logger.

Returns:
the components logger.

setupLogger

protected final void setupLogger(java.lang.Object object)
Utility method to setup specified object with current components logger.

Parameters:
object - the object

setupLogger

protected final void setupLogger(java.lang.Object object,
                                 java.lang.String name)
Utility method to setup specified object with a child logger of components current logger with specified name.

Parameters:
object - the object
name - the name of child logger


Copyright © 2003-2004 Codehaus. All Rights Reserved.