public class Diagnostic
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Diagnostic(java.lang.String loggerName,
int recordsCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfig(java.util.Properties properties) |
protected static void |
addErrorCodeToWatchList(java.lang.String errorCode) |
protected static void |
clearExceptionKeywords() |
<T extends java.lang.Throwable> |
debug(java.util.logging.Level level,
SecurityLabel label,
java.lang.String sourceClass,
java.lang.String sourceMethod,
TraceAttributes attributes,
T thrown,
java.lang.String publicMessage,
java.lang.String sensitiveMessage,
java.lang.Object... params)
Creates a Diagnose First Failure entry.
|
void |
dumpDiagnoseFirstFailure(boolean isDumpSystemConfig)
Push the Diagnose First Failure records to the target Handler.
|
protected static void |
dumpDiagnoseFirstFailureWhenNextExceptionContains(java.lang.String commaSeparatedKeywords) |
void |
enableDiagnoseFirstFailureDump(boolean enableDump)
Enables or disables the automatic dump of Diagnose First Failure data on error.
|
void |
enableSensitive(boolean enabled) |
static Diagnostic |
get(java.lang.String loggerName,
int size)
Factory method for creating Diagnostics.
|
protected static java.lang.String |
getErrorCodesWatchList() |
static java.util.Set<java.lang.Integer> |
getErrorCodeWatchList() |
protected static java.lang.String |
getExceptionKeywords() |
boolean |
isSensitiveEnabled() |
protected static void |
removeErrorCodeFromWatchList(java.lang.String errorCode) |
protected static void |
resetErrorCodeWatchList() |
void |
setDiagnoseFirstFailureBufferSize(int bufferSize) |
void |
setLoggingLevel(java.lang.String newLevel) |
<T extends java.lang.Throwable> |
trace(java.util.logging.Level level,
SecurityLabel label,
java.lang.String sourceClass,
java.lang.String sourceMethod,
TraceAttributes attributes,
T thrown,
java.lang.String publicMessage,
java.lang.String sensitiveMessage,
java.lang.Object... params)
Creates a diagnostic Diagnose First Failure entry.
|
public static Diagnostic get(java.lang.String loggerName, int size)
loggerName - the name of the Logger used to
write log recordssize - the size of the ring buffer used to store Diagnose First Failure recordspublic void addConfig(java.util.Properties properties)
public final void enableSensitive(boolean enabled)
public boolean isSensitiveEnabled()
public void enableDiagnoseFirstFailureDump(boolean enableDump)
enableDump - enable or disable automatic dump of Diagnose First Failure datapublic <T extends java.lang.Throwable> T trace(java.util.logging.Level level,
SecurityLabel label,
java.lang.String sourceClass,
java.lang.String sourceMethod,
TraceAttributes attributes,
T thrown,
java.lang.String publicMessage,
java.lang.String sensitiveMessage,
java.lang.Object... params)
level - the Level of the log entry. May not be nullsourceClass - the fully qualified name of the class containing the call to this method. May not be nullsourceMethod - the name of the method containing the call to this method. May not be nullattributes - the current attributes of the environment containing this call. May be nullthrown - the Throwable for the logRecord if any. May be nullpublicMessage - the message for the LogRecord if sensitive mode is not enabled. May not be nullsensitiveMessage - the message for the LogRecord if sensitive mode is enabled. May be nullparams - the parameters for the message, public parameters first, then the SENSITIVE marker,
then sensitive parameters. If no sensitive parameters the marker may be omitted. May be nullthrownpublic <T extends java.lang.Throwable> T debug(java.util.logging.Level level,
SecurityLabel label,
java.lang.String sourceClass,
java.lang.String sourceMethod,
TraceAttributes attributes,
T thrown,
java.lang.String publicMessage,
java.lang.String sensitiveMessage,
java.lang.Object... params)
level - the Level of the log entry. May not be nulllabel - security labelsourceClass - the fully qualified name of the class containing the call to this method. May not be nullsourceMethod - the name of the method containing the call to this method. May not be nullattributes - the current attributes of the environment containing this call. May be nullthrown - the Throwable for the logRecord if any. May be nullpublicMessage - the message for the LogRecord if sensitive mode is not enabled. May not be nullsensitiveMessage - the message for the LogRecord if sensitive mode is enabled. May be nullparams - the parameters for the message, public parameters first, then the SENSITIVE marker,
then sensitive parameters. If no sensitive parameters the marker may be omitted. May be nullthrownpublic void setLoggingLevel(java.lang.String newLevel)
protected static void addErrorCodeToWatchList(java.lang.String errorCode)
protected static void removeErrorCodeFromWatchList(java.lang.String errorCode)
protected static java.lang.String getErrorCodesWatchList()
protected static void resetErrorCodeWatchList()
public void setDiagnoseFirstFailureBufferSize(int bufferSize)
protected static void dumpDiagnoseFirstFailureWhenNextExceptionContains(java.lang.String commaSeparatedKeywords)
protected static java.lang.String getExceptionKeywords()
protected static void clearExceptionKeywords()
public void dumpDiagnoseFirstFailure(boolean isDumpSystemConfig)
isDumpSystemConfig - Whether add config parameters to the Diagnose First Failure
before pushing to the target handler.public static java.util.Set<java.lang.Integer> getErrorCodeWatchList()