public class CachedLogger extends DefaultLogger
threshold| Constructor and Description |
|---|
CachedLogger(Channel threshold,
int capacity) |
CachedLogger(int capacity)
Uses
Channel.INFO as a default threshold. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String message)
Check if one of the stored messages contain the given text.
|
Optional<Map.Entry<Channel,String>> |
find(BiPredicate<Channel,String> filter)
Find entry with message and channel related to it.
|
List<? extends Map.Entry<Channel,String>> |
getMessages()
Get all stored messages.
|
protected void |
internalLog(Channel channel,
String message)
Internal method used by
DefaultLogger to send processed message to the final implementation. |
exception, getLogger, log, setThreshold, toPrintStreampublic CachedLogger(Channel threshold, int capacity)
public CachedLogger(int capacity)
Channel.INFO as a default threshold.capacity - the capacity of messages cacheprotected void internalLog(Channel channel, String message)
DefaultLoggerDefaultLogger to send processed message to the final implementation.internalLog in class DefaultLoggerchannel - the channel to log tomessage - the message to logpublic boolean contains(String message)
message - the text to search forpublic Optional<Map.Entry<Channel,String>> find(BiPredicate<Channel,String> filter)
filter - the predicate for the channel or the message of the entryCopyright © 2021. All rights reserved.