Class LogRecordListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all existinglog recordsthat have been submitted to this listener by the current thread.voidlogRecordSubmitted(LogRecord logRecord) Inform the listener of aLogRecordthat was submitted to JUL for processing.stream()Get a stream oflog recordsthat have been submitted to this listener by the current thread.Get a stream oflog recordsthat have been submitted to this listener by the current thread for the logger name equal to the name of the given class.Get a stream oflog recordsthat have been submitted to this listener by the current thread for the logger name equal to the name of the given class at the given log level.Get a stream oflog recordsthat have been submitted to this listener by the current thread at the given log level.
-
Constructor Details
-
LogRecordListener
public LogRecordListener()
-
-
Method Details
-
logRecordSubmitted
-
stream
Get a stream oflog recordsthat have been submitted to this listener by the current thread.As stated in the Javadoc for
LogRecord, a submittedLogRecordshould not be updated by the client application. Thus, theLogRecordsin the returned stream should only be inspected for testing purposes and not modified in any way.- See Also:
-
stream
Get a stream oflog recordsthat have been submitted to this listener by the current thread at the given log level.As stated in the Javadoc for
LogRecord, a submittedLogRecordshould not be updated by the client application. Thus, theLogRecordsin the returned stream should only be inspected for testing purposes and not modified in any way.- Parameters:
level- the log level for which to get the log records; nevernull- Since:
- 1.4
- See Also:
-
stream
Get a stream oflog recordsthat have been submitted to this listener by the current thread for the logger name equal to the name of the given class.As stated in the Javadoc for
LogRecord, a submittedLogRecordshould not be updated by the client application. Thus, theLogRecordsin the returned stream should only be inspected for testing purposes and not modified in any way.- Parameters:
clazz- the class for which to get the log records; nevernull- See Also:
-
stream
Get a stream oflog recordsthat have been submitted to this listener by the current thread for the logger name equal to the name of the given class at the given log level.As stated in the Javadoc for
LogRecord, a submittedLogRecordshould not be updated by the client application. Thus, theLogRecordsin the returned stream should only be inspected for testing purposes and not modified in any way.- Parameters:
clazz- the class for which to get the log records; nevernulllevel- the log level for which to get the log records; nevernull- See Also:
-
clear
public void clear()Clear all existinglog recordsthat have been submitted to this listener by the current thread.
-