Package com.atlassian.jira.util.log
Class RateLimitingLogger
java.lang.Object
com.atlassian.jira.util.log.RateLimitingLogger
A logger for use where there is the chance for large numbers of repetitive errors.
This Logger will output only a limited number of stacktraces and then will only output error messages for
warn(String s, Throwable t) and error(String s, Throwable t)- Since:
- v6.3
-
Constructor Summary
ConstructorsConstructorDescriptionRateLimitingLogger(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 -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidvoidvoiderrorWithTrace(String message) voidvoidbooleanbooleanbooleanvoidvoidvoidvoidvoidtraceWithTrace(String message) protected booleanvoidvoidvoidvoidwarnWithTrace(String message)
-
Constructor Details
-
RateLimitingLogger
Create a new logger with defaults for number of stacktraces (25) and time to reset (5 minutes).- Parameters:
clazz- Class for logger name
-
RateLimitingLogger
Create a new logger- Parameters:
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.
-
-
Method Details
-
debug
-
debug
-
debug
-
debug
-
debug
-
trace
-
trace
-
trace
-
trace
-
error
-
error
-
isDebugEnabled
public boolean isDebugEnabled() -
isTraceEnabled
public boolean isTraceEnabled() -
isInfoEnabled
public boolean isInfoEnabled() -
info
-
info
-
warn
-
warnWithTrace
-
errorWithTrace
-
traceWithTrace
-
warn
-
warn
-
wantFullStackTrace
protected boolean wantFullStackTrace()
-