public class SuppressLog<T>
extends java.lang.Object
SuppressCache
) which suppresses (certain) messages from the same member for a given timeModifier and Type | Class and Description |
---|---|
static class |
SuppressLog.Level |
Modifier and Type | Field and Description |
---|---|
protected SuppressCache<T> |
cache |
protected Log |
log |
protected java.lang.String |
message_format |
protected java.lang.String |
suppress_format |
Constructor and Description |
---|
SuppressLog(Log log,
java.lang.String message_key,
java.lang.String suppress_msg) |
Modifier and Type | Method and Description |
---|---|
SuppressCache<T> |
getCache() |
void |
log(SuppressLog.Level level,
T key,
long timeout,
java.lang.Object... args)
Logs a message from a given member if is hasn't been logged for timeout ms
|
void |
removeExpired(long timeout) |
protected final Log log
protected final SuppressCache<T> cache
protected final java.lang.String message_format
protected final java.lang.String suppress_format
public SuppressLog(Log log, java.lang.String message_key, java.lang.String suppress_msg)
public SuppressCache<T> getCache()
public void log(SuppressLog.Level level, T key, long timeout, java.lang.Object... args)
level
- The level, either warn or errorkey
- The key into the SuppressCachetimeout
- The timeoutargs
- The arguments to the message keypublic void removeExpired(long timeout)
Copyright © 1998-2020 Red Hat. All Rights Reserved.