Package com.helger.commons.debug
Class GlobalDebug
java.lang.Object
com.helger.commons.debug.GlobalDebug
Global class for handling the following typical application modes:
- trace
- debug
- production
- Author:
- Philip
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanBy default debug mode is enabledstatic final booleanBy default production mode is disablestatic final booleanBy default silent mode is enabled.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanvoidsetDebugMode(boolean bDebugMode) static voidsetDebugModeDirect(boolean bDebugMode) Enable or disable debug mode.static voidsetJavaCommonComponentsDebugMode(boolean bDebugMode) Set the debug mode for the common Java components: JAXP Javax Activation Javax Mailstatic voidsetJavaNetDebugMode(String sValue) Enable or disable Java net debugging.static voidsetJavaSecurityDebugMode(String sValue) Enable or disable Java security debugging.voidsetProductionMode(boolean bProductionMode) static voidsetProductionModeDirect(boolean bProductionMode) Enable or disable production mode.
-
Field Details
-
DEFAULT_DEBUG_MODE
public static final boolean DEFAULT_DEBUG_MODEBy default debug mode is enabled- See Also:
-
DEFAULT_PRODUCTION_MODE
public static final boolean DEFAULT_PRODUCTION_MODEBy default production mode is disable- See Also:
-
DEFAULT_SILENT_MODE
public static final boolean DEFAULT_SILENT_MODEBy default silent mode is enabled.- Since:
- 9.4.0
- See Also:
-
SYSTEM_PROPERTY_MAIL_DEBUG
- See Also:
-
SYSTEM_PROPERTY_JAVA_SECURITY_DEBUG
- See Also:
-
SYSTEM_PROPERTY_JAVAX_ACTIVATION_DEBUG
- See Also:
-
SYSTEM_PROPERTY_JAVAX_NET_DEBUG
- See Also:
-
SYSTEM_PROPERTY_JAXP_DEBUG
- See Also:
-
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-trueto enable debug mode,falseto disable it
-
setJavaNetDebugMode
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
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-trueto enable,falseto 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-trueto enable,falseto disable
-
isDebugMode
public static boolean isDebugMode()- Returns:
trueif debug mode is active,falseif not
-
isProductionMode
public static boolean isProductionMode()- Returns:
trueif production mode is active,falseif not
-