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

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

public class CLISmartHandler
extends Handler

Handler that handles output to the console with clever formatting.


Field Summary
private  Formatter debugformat
          Formatter for debugging messages
private  Writer err
          Output stream for error output.
private  Formatter errformat
          Formatter for error messages
private  Formatter msgformat
          Formatter for regular messages (informational records)
private  Writer out
          Output stream for non-critical output.
private  ProgressTracker ptrack
          Tracker for progress messages
 
Constructor Summary
CLISmartHandler()
          Default constructor using System.out and System.err
CLISmartHandler(OutputStream out, OutputStream err)
          Constructor
 
Method Summary
 void close()
          Close output streams.
 void flush()
          Flush output streams
 void publish(LogRecord record)
          Publish a log record.
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private Writer out
Output stream for non-critical output.


err

private Writer err
Output stream for error output.


msgformat

private Formatter msgformat
Formatter for regular messages (informational records)


debugformat

private Formatter debugformat
Formatter for debugging messages


errformat

private Formatter errformat
Formatter for error messages


ptrack

private ProgressTracker ptrack
Tracker for progress messages

Constructor Detail

CLISmartHandler

public CLISmartHandler(OutputStream out,
                       OutputStream err)
Constructor

Parameters:
out - Regular output stream
err - Error output stream

CLISmartHandler

public CLISmartHandler()
Default constructor using System.out and System.err

Method Detail

close

public void close()
           throws SecurityException
Close output streams.

Specified by:
close in class Handler
Throws:
SecurityException

flush

public void flush()
Flush output streams

Specified by:
flush in class Handler

publish

public void publish(LogRecord record)
Publish a log record.

Specified by:
publish in class Handler

Release 0.4.0 (2011-09-20_1324)