Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by java.util.logging.Handler
      extended by java.util.logging.StreamHandler
          extended by de.lmu.ifi.dbs.elki.logging.ImmediateFlushHandler

public class ImmediateFlushHandler
extends StreamHandler

ImmediateFlushHandler is a stream handler flushing each published LogRecord immediately.

Author:
Arthur Zimek

Constructor Summary
ImmediateFlushHandler(OutputStream out, Formatter formatter, SelectiveFilter filter)
          Provides a stream handler flushing each published LogRecord immediately to the designated OutputStream.
 
Method Summary
 boolean isLoggable(LogRecord record)
          The given LogRecord is loggable if it is not null and the filter of this handler would treat it as loggable.
 void publish(LogRecord record)
          Publishs the given LogRecord and flushs immediately.
 
Methods inherited from class java.util.logging.StreamHandler
close, flush, setEncoding, setOutputStream
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmediateFlushHandler

public ImmediateFlushHandler(OutputStream out,
                             Formatter formatter,
                             SelectiveFilter filter)
Provides a stream handler flushing each published LogRecord immediately to the designated OutputStream. The handler sets the given filter and the handler's level reflects the filter's level.

Parameters:
out - the OutputStream to publish LogRecords to
formatter - a formatter to format LogRecords for publishing
filter - a filter specifying the minimum level for this handler
See Also:
StreamHandler.StreamHandler()
Method Detail

isLoggable

public boolean isLoggable(LogRecord record)
The given LogRecord is loggable if it is not null and the filter of this handler would treat it as loggable.

Overrides:
isLoggable in class StreamHandler
See Also:
StreamHandler.isLoggable(java.util.logging.LogRecord)

publish

public void publish(LogRecord record)
Publishs the given LogRecord and flushs immediately.

Overrides:
publish in class StreamHandler
See Also:
StreamHandler.publish(java.util.logging.LogRecord)

Release 0.1 (2008-07-10_1838)