Interface JsckLogger


public interface JsckLogger
Logging callback interface used during a Jsck key/value database consistency inspection.
  • Method Details

    • info

      void info(String format, Object... args)
      Log a low-detail (informational) message.
      Parameters:
      format - String.format() format string
      args - format arguments
    • detail

      void detail(String format, Object... args)
      Log a high-detail message.
      Parameters:
      format - String.format() format string
      args - format arguments
    • isDetailEnabled

      boolean isDetailEnabled()
      Determine whether detailed logging should be performed.

      When this returns true, detailed logging is delivered to detail(), otherwise it is suppressed.

      Returns:
      true if detailed logging should be performed
    • wrap

      static JsckLogger wrap(Logger logger)
      Create an instance that wraps the given Logger and logs at Level.INFO and Level.TRACE.
      Parameters:
      logger - destination for log messages
      Returns:
      JsckLogger that logs to logger
      Throws:
      IllegalArgumentException - if logger is null
    • wrap

      static JsckLogger wrap(Logger logger, Level infoLevel, Level detailLevel)
      Create an instance that wraps the given Logger.

      The returned instance logs info() messages at infoLevel and and detail() messages to at detailLevel.

      Parameters:
      logger - destination for log messages
      infoLevel - log level for info() messages, or null to suppress info messages
      detailLevel - log level for detail() messages, or null to suppress detail messages
      Returns:
      JsckLogger that logs to logger
      Throws:
      IllegalArgumentException - if logger is null