Class GlobalDebug

java.lang.Object
com.helger.commons.debug.GlobalDebug

@ThreadSafe public final class GlobalDebug extends Object
Global class for handling the following typical application modes:
  • trace
  • debug
  • production
trace is the lowest mode, debug is one level higher and production is the highest value. By default all modes are deactivated.
Author:
Philip
  • Field Details

    • DEFAULT_DEBUG_MODE

      public static final boolean DEFAULT_DEBUG_MODE
      By default debug mode is enabled
      See Also:
    • DEFAULT_PRODUCTION_MODE

      public static final boolean DEFAULT_PRODUCTION_MODE
      By default production mode is disable
      See Also:
    • DEFAULT_SILENT_MODE

      public static final boolean DEFAULT_SILENT_MODE
      By default silent mode is enabled.
      Since:
      9.4.0
      See Also:
    • SYSTEM_PROPERTY_MAIL_DEBUG

      public static final String SYSTEM_PROPERTY_MAIL_DEBUG
      See Also:
    • SYSTEM_PROPERTY_JAVA_SECURITY_DEBUG

      public static final String SYSTEM_PROPERTY_JAVA_SECURITY_DEBUG
      See Also:
    • SYSTEM_PROPERTY_JAVAX_ACTIVATION_DEBUG

      public static final String SYSTEM_PROPERTY_JAVAX_ACTIVATION_DEBUG
      See Also:
    • SYSTEM_PROPERTY_JAVAX_NET_DEBUG

      public static final String SYSTEM_PROPERTY_JAVAX_NET_DEBUG
      See Also:
    • SYSTEM_PROPERTY_JAXP_DEBUG

      public static final String SYSTEM_PROPERTY_JAXP_DEBUG
      See Also:
    • SYSTEM_PROPERTY_SERIALIZATION_DEBUG

      public static final String SYSTEM_PROPERTY_SERIALIZATION_DEBUG
      See Also:
  • Constructor Details

    • GlobalDebug

      public GlobalDebug()
  • Method Details

    • setDebugMode

      public void setDebugMode(boolean bDebugMode)
    • setProductionMode

      public void setProductionMode(boolean bProductionMode)
    • setJavaCommonComponentsDebugMode

      public static void setJavaCommonComponentsDebugMode(boolean bDebugMode)
      Set the debug mode for the common Java components:
      • JAXP
      • Javax Activation
      • Javax Mail
      Parameters:
      bDebugMode - true to enable debug mode, false to disable it
    • setJavaNetDebugMode

      public static void setJavaNetDebugMode(@Nullable String sValue)
      Enable or disable Java net debugging.
      Parameters:
      sValue - Debug property value. Valid values are:
      • null
      • all
      • ssl
      • ssl:xxx (see Java docs what xxx can be)
      Since:
      8.6.1
    • setJavaSecurityDebugMode

      public static void setJavaSecurityDebugMode(@Nullable String sValue)
      Enable or disable Java security debugging.
      Parameters:
      sValue - Debug property value. Valid values are:
      • null
      • all
      • access
      • certpath
      • combiner
      • gssloginconfig
      • configfile
      • configparser
      • jar
      • logincontext
      • policy
      • provider
      • scl
      Since:
      8.6.1
    • setDebugModeDirect

      public static void setDebugModeDirect(boolean bDebugMode)
      Enable or disable debug mode. If debug mode is disabled, also trace mode is disabled.
      Parameters:
      bDebugMode - true to enable, false to disable
    • setProductionModeDirect

      public static void setProductionModeDirect(boolean bProductionMode)
      Enable or disable production mode. If production mode is enabled, also trace mode and debug mode are disabled.
      Parameters:
      bProductionMode - true to enable, false to disable
    • isDebugMode

      public static boolean isDebugMode()
      Returns:
      true if debug mode is active, false if not
    • isProductionMode

      public static boolean isProductionMode()
      Returns:
      true if production mode is active, false if not