public class StdOutConsoleHandler extends java.util.logging.StreamHandler implements LogConfigSubscriber
ConsoleHandler, but using System.out instead of System.err.
Note that we can't inherit from ConsoleHandler and reset the output stream
using setOutputStream(System.out), because this would yield a call to System.err.close().
| Constructor and Description |
|---|
StdOutConsoleHandler(LogConfig logConfig,
java.lang.String loggerName,
alma.acs.logging.LogThrottle logThrottle) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Override StreamHandler.close to do a flush but not to close
the output stream.
|
void |
configureLogging(LogConfig newLogConfig) |
void |
publish(java.util.logging.LogRecord record)
Publish a LogRecord.
|
flush, isLoggable, setEncoding, setOutputStreampublic StdOutConsoleHandler(LogConfig logConfig, java.lang.String loggerName, alma.acs.logging.LogThrottle logThrottle)
logConfig - to get configuration data from, and subscribe for future updatesloggerName - logThrottle - optional log throttle, may be null if not used.public void configureLogging(LogConfig newLogConfig)
configureLogging in interface LogConfigSubscriberLogConfigSubscriber.configureLogging(alma.acs.logging.config.LogConfig)public void publish(java.util.logging.LogRecord record)
The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
publish in class java.util.logging.StreamHandlerrecord - description of the log event. A null record is silently
ignored and is not publishedpublic void close()
close in class java.util.logging.StreamHandler