org.cybergarage.util

## Class Debug

- java.lang.Object
- - org.cybergarage.util.Debug

-     public final class Debug
      extends Object

  Debug utility class for the CyberLink framework.

  This class provides debug logging functionality that integrates with the I2P logging system. It supports conditional debug output based on configuration settings.

  All methods are static to provide convenient access throughout the framework. Debug output can be enabled/disabled at runtime.

  Version:
    1.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `enabled` Flag indicating whether debug output is enabled.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Debug()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `initialize(I2PAppContext ctx)` Initializes debug system with I2P application context.
    `static boolean` | `isOn()` Checks if debug output is enabled.
    `static void` | `message(String s)` Logs a debug message.
    `static void` | `message(String m1, String m2)` Logs two debug messages.
    `static void` | `off()` Disables debug output.
    `static void` | `on()` Enables debug output.
    `static void` | `warning(Exception e)` Logs an exception as a warning.
    `static void` | `warning(String s)` Logs a warning message.
    `static void` | `warning(String m, Exception e)` Logs a warning message with exception.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### enabled

          public static boolean enabled

      Flag indicating whether debug output is enabled. When true, debug messages will be logged; when false, they are suppressed.

  - ### Constructor Detail

    - #### Debug

          public Debug()

  - ### Method Detail

    - #### initialize

          public static void initialize(I2PAppContext ctx)

      Initializes debug system with I2P application context.
      Parameters:
        `ctx` - I2P application context for logging

    - #### isOn

          public static boolean isOn()

      Checks if debug output is enabled.
      Returns:
        true if debug is enabled, false otherwise

    - #### message

          public static final void message(String s)

      Logs a debug message.
      Parameters:
        `s` - message to log

    - #### message

          public static final void message(String m1,
                                           String m2)

      Logs two debug messages.
      Parameters:
        `m1` - first message to log
        `m2` - second message to log

    - #### off

          public static final void off()

      Disables debug output.

    - #### on

          public static final void on()

      Enables debug output.

    - #### warning

          public static final void warning(Exception e)

      Logs an exception as a warning.
      Parameters:
        `e` - exception to log

    - #### warning

          public static final void warning(String s)

      Logs a warning message.
      Parameters:
        `s` - warning message to log

    - #### warning

          public static final void warning(String m,
                                           Exception e)

      Logs a warning message with exception.
      Parameters:
        `m` - warning message to log
        `e` - exception to log