public class RateLimitingLogger extends Object
warn(Object s, Throwable t)
and error(Object s, Throwable t)
Constructor and Description |
---|
RateLimitingLogger(Class clazz)
Create a new logger with defaults for number of stacktraces (25) and time to reset (5 minutes).
|
RateLimitingLogger(Class clazz,
int maxStackTraces,
int resetAfterMinutes)
Create a new logger
|
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message) |
void |
debug(Object message,
Throwable t) |
void |
error(Object message) |
void |
error(Object message,
Throwable t) |
void |
errorWithTrace(Object message) |
void |
fatal(Object message) |
void |
fatal(Object message,
Throwable t) |
void |
info(Object message) |
void |
info(Object message,
Throwable t) |
boolean |
isDebugEnabled() |
boolean |
isEnabledFor(org.apache.log4j.Priority level) |
boolean |
isInfoEnabled() |
boolean |
isTraceEnabled() |
void |
trace(Object message) |
void |
trace(Object message,
Throwable t) |
protected boolean |
wantFullStackTrace() |
void |
warn(Object message) |
void |
warn(Object message,
Throwable t) |
void |
warnWithTrace(Object message) |
public RateLimitingLogger(Class clazz)
clazz
- Class for logger namepublic RateLimitingLogger(Class clazz, int maxStackTraces, int resetAfterMinutes)
clazz
- Class for logger namemaxStackTraces
- Maximum number of stacktraces to print before starting suppression.resetAfterMinutes
- Number of minutes where the logger is idle to cause a reset to recommence printing stacktraces.public void trace(Object message)
public boolean isTraceEnabled()
public void debug(Object message)
public void error(Object message)
public void fatal(Object message)
public boolean isDebugEnabled()
public boolean isEnabledFor(org.apache.log4j.Priority level)
public boolean isInfoEnabled()
public void info(Object message)
public void warn(Object message)
public void warnWithTrace(Object message)
public void errorWithTrace(Object message)
protected boolean wantFullStackTrace()
Copyright © 2002-2015 Atlassian. All Rights Reserved.