Package net.ssehub.easy.basics.logger
Class AbstractJavaLogger.ConsoleHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- net.ssehub.easy.basics.logger.AbstractJavaLogger.ConsoleHandler
-
- Enclosing class:
- AbstractJavaLogger
protected class AbstractJavaLogger.ConsoleHandler extends java.util.logging.HandlerConsole Handler for theJavaLoggerto allow the specification of the desired system console.
This logger will log per default toSystem.err.- Author:
- El-Sharkawy
- See Also:
setConsole(PrintStream)
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.PrintStreamconsole
-
Constructor Summary
Constructors Modifier Constructor Description protectedConsoleHandler()Constructs a new ConsoleHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidpublish(java.util.logging.LogRecord record)voidsetConsole(java.io.PrintStream console)Sets the output console of this console logger.
-
-
-
Method Detail
-
publish
public void publish(java.util.logging.LogRecord record)
- Specified by:
publishin classjava.util.logging.Handler
-
flush
public void flush()
- Specified by:
flushin classjava.util.logging.Handler
-
close
public void close() throws java.lang.SecurityException- Specified by:
closein classjava.util.logging.Handler- Throws:
java.lang.SecurityException
-
setConsole
public void setConsole(java.io.PrintStream console)
Sets the output console of this console logger.- Parameters:
console- Must beSystem.outorSystem.err.
-
-