Package io.deephaven.logging
Class BridgingLogHandler
java.lang.Object
java.util.logging.Handler
io.deephaven.logging.BridgingLogHandler
This class is used to handle java.util.logging.Logger messages.
The following functionality is provided:
- forward messages to a
Logger
once it is set - queue messages until a
Logger
is set - filter which messages will be logged
- optionally flush any queued messages to stdout on process shutdown
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendPendingLogRecord
(com.fishlib.base.log.LogOutput logOutput, io.deephaven.logging.BridgingLogHandler.PendingLogRecord pendingLogRecord) void
close()
void
flush()
void
static void
setFlushPendingOnShutdown
(boolean v) static void
setLogger
(com.fishlib.io.logger.Logger log) Flush any pending messages and permanently change the mode of BridgingLogHandler to filter and log immediately instead of queueing.Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Constructor Details
-
BridgingLogHandler
public BridgingLogHandler()
-
-
Method Details
-
setFlushPendingOnShutdown
public static void setFlushPendingOnShutdown(boolean v) -
setLogger
public static void setLogger(@NotNull com.fishlib.io.logger.Logger log) Flush any pending messages and permanently change the mode of BridgingLogHandler to filter and log immediately instead of queueing.- Parameters:
log
- messages will be passed through to this logger
-
appendPendingLogRecord
public static void appendPendingLogRecord(com.fishlib.base.log.LogOutput logOutput, io.deephaven.logging.BridgingLogHandler.PendingLogRecord pendingLogRecord) -
publish
-
flush
public void flush() -
close
- Specified by:
close
in classHandler
- Throws:
SecurityException
-