public class MultichannelCachedLogger extends DefaultLogger
threshold| Constructor and Description |
|---|
MultichannelCachedLogger(Channel threshold,
int capacity,
Set<Channel> channels) |
MultichannelCachedLogger(int capacity)
Uses
Channel.INFO as a default threshold. |
MultichannelCachedLogger(int capacity,
Set<Channel> channels)
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.
|
Map<? extends Channel,? extends List<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 MultichannelCachedLogger(Channel threshold, int capacity, Set<Channel> channels)
public MultichannelCachedLogger(int capacity,
Set<Channel> channels)
Channel.INFO as a default threshold.capacity - the capacity of messages cachechannels - list of supported channelspublic MultichannelCachedLogger(int capacity)
Channel.INFO as a default threshold.
Uses Channel.getPredefinedChannels() as a default predefined channels.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.