java.lang.Object
dk.cloudcreate.essentials.shared.measurement.LogThresholds

public class LogThresholds extends Object
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.
If none of the thresholds are exceeded and metrics collection and logging is enabled, then the statistics are logged using TRACE level.
  • 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.
      If none of the thresholds are exceeded and metrics collection and logging is enabled, then the statistics are logged using TRACE level.
      Parameters:
      debug - threshold for debug level logging in milliseconds
      info - threshold for info level logging in milliseconds
      warn - threshold for warn level logging in milliseconds
      error - threshold for error level logging in milliseconds
  • Method Details

    • defaultThresholds

      public static LogThresholds defaultThresholds()
    • getDebug

      public long getDebug()
    • getInfo

      public long getInfo()
    • getWarn

      public long getWarn()
    • getError

      public long getError()