java.lang.Object
org.rrd4j.core.RrdLog

public final class RrdLogextends Object
Logging hook for the vendored rrd4j tree.

This library is built standalone (see apps/jrobin/java/build.xml, which compiles with no classpath), so it cannot reference I2P's LogManager directly. Instead the embedder installs a delegate at startup and the library routes its diagnostics through it. With no delegate installed every call is a no-op, which is the correct default for standalone use.

Added because rrd4j runs scheduled work whose failure mode is invisible: ScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, TimeUnit) cancels all future executions when the task throws, so a single failed flush silently ends all later ones. Without a log line there is no way to tell that from "nothing to write".

  • Method Details

    • setDelegate

      public static void setDelegate(RrdLog.Delegate delegate)
      Install the sink for rrd4j diagnostics.
      Parameters:
      delegate - the sink, or null to silence rrd4j again
    • getDelegate

      public static RrdLog.Delegate getDelegate()
      Return the currently installed sink.
      Returns:
      the installed sink, or null if none
    • debug

      public static void debug(String message)
      Log at debug severity.
      Parameters:
      message - the debug text passed to the installed delegate
    • warn

      public static void warn(String message, Throwable cause)
      Log at warning severity.
      Parameters:
      message - the warning text passed to the installed delegate
      cause - the exception being warned about, or null if there is none
    • error

      public static void error(String message, Throwable cause)
      Log at error severity.
      Parameters:
      message - the error text passed to the installed delegate
      cause - the exception being reported, or null if there is none