public class LogMonitor
extends java.util.logging.Handler
| Modifier and Type | Class and Description |
|---|---|
class |
LogMonitor.Session
This class represents a running monitoring session.
|
| Constructor and Description |
|---|
LogMonitor(LogLevel level)
Construct
LogMonitor. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
excludeThread(java.lang.Thread thread)
Exclude a
Thread from monitoring. |
void |
flush() |
java.util.Collection<java.util.logging.LogRecord> |
getRecords()
Get the
LogRecords collected by this monitor. |
void |
includeThread(java.lang.Thread thread)
Include a
Thread in monitoring. |
boolean |
notEmpty()
Check whether this monitor's buffer is not empty and does contain any records.
|
void |
publish(java.util.logging.LogRecord record) |
LogMonitor.Session |
start()
Start a monitoring session.
|
public LogMonitor(LogLevel level)
LogMonitor.level - The log level to use for monitoring.public void includeThread(java.lang.Thread thread)
Thread in monitoring.thread - The thread to monitor.excludeThread(Thread)public void excludeThread(java.lang.Thread thread)
Thread from monitoring.thread - The thread to remove.includeThread(Thread)public boolean notEmpty()
true if this monitor's buffer is not empty and does contain any records.public java.util.Collection<java.util.logging.LogRecord> getRecords()
LogRecords collected by this monitor.LogRecords collected by this monitor.public LogMonitor.Session start()
LogMonitor.Sessionpublic 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 class java.util.logging.Handler