Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.logging
Class AbstractLoggable

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
Direct Known Subclasses:
AbstractParameterizable, CASHIntervalSplit, KNNExplorer.ExplorerWindow, OptionHandler, ResultROCCurveVisualizer.ROCWindow

public abstract class AbstractLoggable
extends Object

Abstract superclass for classes being loggable, i.e. classes intending to log messages.

Author:
Steffi Wanka

Field Summary
protected  boolean debug
          Holds the class specific debug status.
protected  Logging logger
          The logger of the class.
 
Constructor Summary
protected AbstractLoggable(boolean debug)
          Initializes the logger and sets the debug status to the given value.
protected AbstractLoggable(boolean debug, String name)
          Initializes the logger with the given name and sets the debug status to the given value.
 
Method Summary
 void debugFine(String msg)
          Log a DEBUG_FINE message.
 void debugFiner(String msg)
          Log a DEBUG_FINER message.
 void debugFinest(String msg)
          Log a DEBUG_FINEST message.
 void exception(String msg, Throwable e)
          Log an exception at SEVERE level.
 void progress(Progress pgr)
          Log a PROGRESS message.
 void verbose(String msg)
          Log a VERBOSE message.
 void warning(String msg)
          Log a WARNING message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected boolean debug
Holds the class specific debug status.


logger

protected final Logging logger
The logger of the class.

Constructor Detail

AbstractLoggable

protected AbstractLoggable(boolean debug)
Initializes the logger and sets the debug status to the given value.

Parameters:
debug - the debug status.

AbstractLoggable

protected AbstractLoggable(boolean debug,
                           String name)
Initializes the logger with the given name and sets the debug status to the given value.

Parameters:
debug - the debug status.
name - the name of the logger.
Method Detail

exception

public void exception(String msg,
                      Throwable e)
Log an exception at SEVERE level.

If the logger is currently enabled for the SEVERE message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg -
e -

warning

public void warning(String msg)
Log a WARNING message.

If the logger is currently enabled for the WARNING message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg -

progress

public void progress(Progress pgr)
Log a PROGRESS message.

If the logger is currently enabled for the PROGRESS message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
pgr -

verbose

public void verbose(String msg)
Log a VERBOSE message.

If the logger is currently enabled for the VERBOSE message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg -

debugFine

public void debugFine(String msg)
Log a DEBUG_FINE message.

If the logger is currently enabled for the DEBUG_FINE message level then the given message is forwarded to all the registered output Handler objects. Depreciated: Use

 if (logger.isDebugging()) {
   logger.debugFine(msg);
 }
 
instead. If msg is a constant, you can leave away the if statement.

Parameters:
msg -

debugFiner

public void debugFiner(String msg)
Log a DEBUG_FINER message.

If the logger is currently enabled for the DEBUG_FINER message level then the given message is forwarded to all the registered output Handler objects. Depreciated: Use

 if (logger.isDebuggingFiner()) {
   logger.debugFiner(msg);
 }
 
instead. If msg is a constant, you can leave away the if statement.

Parameters:
msg -

debugFinest

public void debugFinest(String msg)
Log a DEBUG_FINEST message.

If the logger is currently enabled for the DEBUG_FINEST message level then the given message is forwarded to all the registered output Handler objects. Depreciated: Use

 if (logger.isDebuggingFinest()) {
   logger.debugFinest(msg);
 }
 
instead. If msg is a constant, you can leave away the if statement.

Parameters:
msg -

Release 0.2.1 (2009-07-13_1605)