public class LogRecorder.Session
extends java.util.logging.Handler
implements java.lang.AutoCloseable
LogRecorder.start(boolean),
close()| Modifier and Type | Method and Description |
|---|---|
void |
close() |
LogRecorder.Session |
excludeThread(java.util.function.Predicate<java.lang.Thread> exclude)
Add an exclude Predicate to the LogRecorder.Session.
|
void |
flush() |
java.util.Collection<java.util.logging.LogRecord> |
getRecords()
Get the LogRecords that have been recorded by this LogRecorder.Session so far.
|
LogRecorder.Session |
includeThread(java.util.function.Predicate<java.lang.Thread> include)
Add an include Predicate to the session.
|
void |
publish(java.util.logging.LogRecord record) |
public LogRecorder.Session includeThread(java.util.function.Predicate<java.lang.Thread> include)
To be recorded an issued LogRecord's thread must match at least one of the include Predicates.
include - The include Predicate to apply.public LogRecorder.Session excludeThread(java.util.function.Predicate<java.lang.Thread> exclude)
To be recorded an issued LogRecord's thread must not match any of the exclude Predicates.
exclude - The exclude Predicate to apply.public java.util.Collection<java.util.logging.LogRecord> getRecords()
public void publish(@Nullable java.util.logging.LogRecord record)
publish in class java.util.logging.Handlerpublic void flush()
flush in class java.util.logging.Handlerpublic void close()
close in interface java.lang.AutoCloseableclose in class java.util.logging.Handler