public class GridLogThrottle extends Object
Errors are logged only if they were not logged for the last
throttleTimeout milliseconds.
Note that not only error messages are checked for duplicates, but also exception
classes.
| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_THROTTLE_TIMEOUT
Default throttle timeout in milliseconds (value is 5 * 60 * 1000).
|
| Modifier | Constructor and Description |
|---|---|
protected |
GridLogThrottle()
Ensure singleton.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
Clears all stored data.
|
static void |
error(@Nullable IgniteLogger log,
@Nullable Throwable e,
String msg)
Logs error if needed.
|
static void |
error(@Nullable IgniteLogger log,
@Nullable Throwable e,
String msg,
boolean byMsg)
Logs error if needed.
|
static void |
info(@Nullable IgniteLogger log,
String msg)
Logs info if needed.
|
static void |
info(@Nullable IgniteLogger log,
String msg,
boolean quiet)
Logs info if needed.
|
static int |
throttleCapacity()
Gets system-wide log throttle capacity.
|
static int |
throttleTimeout()
Gets system-wide log throttle timeout.
|
static void |
throttleTimeout(int timeout)
Sets system-wide log throttle timeout.
|
static void |
warn(@Nullable IgniteLogger log,
String msg)
Logs warning if needed.
|
static void |
warn(@Nullable IgniteLogger log,
String msg,
boolean quiet)
Logs warning if needed.
|
static void |
warn(@Nullable IgniteLogger log,
@Nullable Throwable e,
String msg,
boolean quite,
boolean byMsg)
Logs warning if needed.
|
public static final int DFLT_THROTTLE_TIMEOUT
public static void throttleTimeout(int timeout)
timeout - System-wide log throttle timeout.public static int throttleTimeout()
public static int throttleCapacity()
public static void error(@Nullable
@Nullable IgniteLogger log,
@Nullable
@Nullable Throwable e,
String msg)
log - Logger.e - Error (optional).msg - Message.public static void error(@Nullable
@Nullable IgniteLogger log,
@Nullable
@Nullable Throwable e,
String msg,
boolean byMsg)
log - Logger.e - Error (optional).msg - Message.byMsg - Errors group by message, not by tuple(error, msg).public static void warn(@Nullable
@Nullable IgniteLogger log,
String msg)
log - Logger.msg - Message.public static void warn(@Nullable
@Nullable IgniteLogger log,
@Nullable
@Nullable Throwable e,
String msg,
boolean quite,
boolean byMsg)
log - Logger.e - Error (optional).msg - Message.quite - Print warning anyway.byMsg - Errors group by message, not by tuple(error, msg).public static void warn(@Nullable
@Nullable IgniteLogger log,
String msg,
boolean quiet)
log - Logger.msg - Message.quiet - Print warning anyway.public static void info(@Nullable
@Nullable IgniteLogger log,
String msg,
boolean quiet)
log - Logger.msg - Message.quiet - Print info anyway.public static void info(@Nullable
@Nullable IgniteLogger log,
String msg)
log - Logger.msg - Message.public static void clear()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020