public class TraceComponent extends java.lang.Object implements FFDCSelfIntrospectable
TraceComponent
represents a single component registered for logging.
The scoping of the component is arbitrary in that it may represent a single class or
it could be shared by several classes.
A TraceComponent
should be registered with Tr using a class to assist in finding
the associated ResourceBundle for messages. It may have an additional name and one
or more groups. The log level for any given component is controlled by a match in the
trace specification for the class (including package), name, or trace group.
Modifier and Type | Method and Description |
---|---|
java.util.logging.Logger |
getLogger() |
java.util.logging.Level |
getLoggerLevel() |
java.lang.String |
getName() |
java.lang.String |
getResourceBundleName() |
java.lang.Class<?> |
getTraceClass() |
java.lang.String[] |
introspectSelf()
Returns an array of Strings representing the object's state.
|
static boolean |
isAnyTracingEnabled() |
boolean |
isAuditEnabled() |
boolean |
isConfigEnabled() |
boolean |
isDebugEnabled() |
boolean |
isDetailEnabled() |
boolean |
isDumpEnabled() |
boolean |
isEntryEnabled() |
boolean |
isErrorEnabled() |
boolean |
isEventEnabled() |
boolean |
isFatalEnabled() |
boolean |
isInfoEnabled() |
boolean |
isServiceEnabled() |
boolean |
isWarningEnabled() |
void |
setLoggerForCallback(TraceStateChangeListener listener) |
java.lang.String |
toString() |
public static boolean isAnyTracingEnabled()
public java.lang.Class<?> getTraceClass()
public java.util.logging.Logger getLogger()
public final java.lang.String getResourceBundleName()
public final void setLoggerForCallback(TraceStateChangeListener listener)
public final java.lang.String getName()
public final boolean isDumpEnabled()
public final boolean isDebugEnabled()
public final boolean isEntryEnabled()
public final boolean isEventEnabled()
public final boolean isDetailEnabled()
public final boolean isConfigEnabled()
public final boolean isInfoEnabled()
public final boolean isAuditEnabled()
public final boolean isWarningEnabled()
public final boolean isErrorEnabled()
public final boolean isFatalEnabled()
public final boolean isServiceEnabled()
public final java.util.logging.Level getLoggerLevel()
public java.lang.String[] introspectSelf()
FFDCSelfIntrospectable
Do not return any sensitive information in the FFDC dump
If the object implements this interface, normal introspection dump will be skipped. Ensure that all information that you want captured in the FFDC is included in the return of this method.
The Strings can take the following format:
Example implementation:
public String[] introspectSelf() {
StringBuffer introspectBuffer = new StringBuffer();
String[] returnValue = new String[2];
introspectBuffer.append("variableName1 = ");
introspectBuffer.append(variableName1);
returnValue[0] = new String(introspectBuffer);
introspectBuffer.setLength(0);
introspectBuffer.append("variableName2 = ");
introspectBuffer.append(variableName2);
returnValue[1] = new String(introspectBuffer);
return returnValue;
}
introspectSelf
in interface FFDCSelfIntrospectable
public java.lang.String toString()
toString
in class java.lang.Object