Package elki.logging
Class CLISmartHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- elki.logging.CLISmartHandler
-
public class CLISmartHandler extends java.util.logging.Handler
Handler that handles output to the console with clever formatting.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.logging.Formatter
debugformat
Formatter for debugging messagesprivate java.io.Writer
err
Output stream for error output.private java.util.logging.Formatter
errformat
Formatter for error messagesprivate java.util.logging.Formatter
msgformat
Formatter for regular messages (informational records)private java.io.Writer
out
Output stream for non-critical output.private ProgressTracker
ptrack
Tracker for progress messages
-
Constructor Summary
Constructors Constructor Description CLISmartHandler()
Default constructor usingSystem.out
andSystem.err
CLISmartHandler(java.io.OutputStream out, java.io.OutputStream err)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close output streams.void
flush()
Flush output streamsvoid
publish(java.util.logging.LogRecord record)
Publish a log record.
-
-
-
Field Detail
-
out
private java.io.Writer out
Output stream for non-critical output.
-
err
private java.io.Writer err
Output stream for error output.
-
msgformat
private java.util.logging.Formatter msgformat
Formatter for regular messages (informational records)
-
debugformat
private java.util.logging.Formatter debugformat
Formatter for debugging messages
-
errformat
private java.util.logging.Formatter errformat
Formatter for error messages
-
ptrack
private ProgressTracker ptrack
Tracker for progress messages
-
-
Method Detail
-
close
public void close() throws java.lang.SecurityException
Close output streams.- Specified by:
close
in classjava.util.logging.Handler
- Throws:
java.lang.SecurityException
-
flush
public void flush()
Flush output streams- Specified by:
flush
in classjava.util.logging.Handler
-
publish
public void publish(java.util.logging.LogRecord record)
Publish a log record.- Specified by:
publish
in classjava.util.logging.Handler
-
-