Class LogThresholds
java.lang.Object
dk.cloudcreate.essentials.shared.measurement.LogThresholds
Encapsulates logging threshold values (in milliseconds) for different log levels.
When a measured operation’s duration exceeds a given threshold, it is logged at the corresponding log level. Specifically:
- error: If the duration exceeds this threshold, the operation is logged at ERROR level.
- warn: If the duration exceeds this threshold, the operation is logged at WARN level.
- info: If the duration exceeds this threshold, the operation is logged at INFO level.
- debug: If the duration exceeds this threshold, the operation is logged at DEBUG level.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogThresholds(long debug, long info, long warn, long error) Constructs a new LogThresholds instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic LogThresholdslonggetDebug()longgetError()longgetInfo()longgetWarn()
-
Field Details
-
debug
public final long debug -
info
public final long info -
warn
public final long warn -
error
public final long error
-
-
Constructor Details
-
LogThresholds
public LogThresholds(long debug, long info, long warn, long error) Constructs a new LogThresholds instance.When a measured operation’s duration exceeds a given threshold, it is logged at the corresponding log level. Specifically:
- error: If the duration exceeds this threshold, the operation is logged at ERROR level.
- warn: If the duration exceeds this threshold, the operation is logged at WARN level.
- info: If the duration exceeds this threshold, the operation is logged at INFO level.
- debug: If the duration exceeds this threshold, the operation is logged at DEBUG level.
- Parameters:
debug- threshold for debug level logging in millisecondsinfo- threshold for info level logging in millisecondswarn- threshold for warn level logging in millisecondserror- threshold for error level logging in milliseconds
-
-
Method Details
-
defaultThresholds
-
getDebug
public long getDebug() -
getInfo
public long getInfo() -
getWarn
public long getWarn() -
getError
public long getError()
-