public class SuppressLog<T>
extends java.lang.Object
SuppressCache) which suppresses (certain) messages from the same member for a given time| 限定符和类型 | 类和说明 |
|---|---|
static class |
SuppressLog.Level |
| 限定符和类型 | 字段和说明 |
|---|---|
protected SuppressCache<T> |
cache |
protected Log |
log |
protected java.lang.String |
message_format |
protected java.lang.String |
suppress_format |
| 构造器和说明 |
|---|
SuppressLog(Log log,
java.lang.String message_key,
java.lang.String suppress_msg) |
| 限定符和类型 | 方法和说明 |
|---|---|
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)