Class Overview
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(Object, Throwable)
and error(Object, Throwable)
Summary
Public Constructors |
|
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
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
RateLimitingLogger
(Class clazz)
Create a new logger with defaults for number of stacktraces (25) and time to reset (5 minutes).
Parameters
clazz
| Class for logger name
|
public
RateLimitingLogger
(Class clazz, int maxStackTraces, int resetAfterMinutes)
Parameters
clazz
| Class for logger name |
maxStackTraces
| 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 Methods
public
void
debug
(Object message)
public
void
error
(Object message)
public
void
errorWithTrace
(Object message)
public
void
fatal
(Object message)
public
void
info
(Object message)
public
boolean
isDebugEnabled
()
public
boolean
isEnabledFor
(Priority level)
public
boolean
isInfoEnabled
()
public
boolean
isTraceEnabled
()
public
void
trace
(Object message)
public
void
warn
(Object message)
public
void
warnWithTrace
(Object message)
Protected Methods
protected
boolean
wantFullStackTrace
()