Package io.deephaven.logging
Class TempLogInterceptor
java.lang.Object
io.deephaven.logging.TempLogInterceptor
- All Implemented Interfaces:
- com.fishlib.io.log.LogSink.Interceptor<com.fishlib.io.log.LogEntry>
public class TempLogInterceptor
extends Object
implements com.fishlib.io.log.LogSink.Interceptor<com.fishlib.io.log.LogEntry>
Queue log messages for a brief time while creating the initial logger.
 This captures noise that would go to STDOUT and holds it until there's a better destination for it.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Empty the queue without logging.voidelement(com.fishlib.io.log.LogEntry e, com.fishlib.base.log.LogOutput logOutput) voidflush(com.fishlib.io.logger.Logger maybeLog) Empty the queue to maybeLog, or to STDOUT if not given.static com.fishlib.io.logger.LoggerquietLogCreator(Supplier<com.fishlib.io.logger.Logger> logProducer) Intercept any log messages produced while creating a logger, then dump those messages to the created logger.
- 
Constructor Details- 
TempLogInterceptorpublic TempLogInterceptor()
 
- 
- 
Method Details- 
quietLogCreator@Nullable public static com.fishlib.io.logger.Logger quietLogCreator(@NotNull Supplier<com.fishlib.io.logger.Logger> logProducer) Intercept any log messages produced while creating a logger, then dump those messages to the created logger. This is required to redirect logging messages produced during initialization away from stdout.- Parameters:
- logProducer- code to produce a logger
- Returns:
- the logger created by the supplier
 
- 
elementpublic void element(com.fishlib.io.log.LogEntry e, com.fishlib.base.log.LogOutput logOutput) throws IOException - Specified by:
- elementin interface- com.fishlib.io.log.LogSink.Interceptor<com.fishlib.io.log.LogEntry>
- Throws:
- IOException
 
- 
flushpublic void flush(@Nullable com.fishlib.io.logger.Logger maybeLog) Empty the queue to maybeLog, or to STDOUT if not given. This is reentrant and deactivates the interceptor.- Parameters:
- maybeLog- optional sink for log messages
 
- 
clearpublic void clear()Empty the queue without logging. This is reentrant and deactivates the interceptor.
 
-