Package io.deephaven.io.log
Interface LogSink<T extends LogSink.Element>
-
- All Known Implementing Classes:
LogSink.Null,LogSinkImpl
public interface LogSink<T extends LogSink.Element>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLogSink.ElementOne element of a log sink - guaranteed to be logged without being split over rolling file boundaries, etc.static interfaceLogSink.Factory<T extends LogSink.Element>static interfaceLogSink.Interceptor<T extends LogSink.Element>An interceptor is called with each element logged, *and* with the formatted output.static interfaceLogSink.LogSinkWriter<S extends LogSink<? extends LogSink.Element>>static classLogSink.Nullstatic classLogSink.ShutdownShutdown helpers to force flush of outstanding elements
-
Field Summary
Fields Modifier and Type Field Description static LogSink.NullNULL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddInterceptor(LogSink.Interceptor<T> interceptor)You can add as many interceptors to a log sink as you like.voidshutdown()Shutdown cleanly, flushing all current elements.voidterminate()Shutdown aggressively, without trying to flush.voidwrite(T e)Write an element.
-
-
-
Field Detail
-
NULL
static final LogSink.Null NULL
-
-
Method Detail
-
write
void write(T e)
Write an element.- Parameters:
e-
-
shutdown
void shutdown()
Shutdown cleanly, flushing all current elements.
-
terminate
void terminate()
Shutdown aggressively, without trying to flush.
-
addInterceptor
void addInterceptor(LogSink.Interceptor<T> interceptor)
You can add as many interceptors to a log sink as you like.
-
-