Package com.ibm.websphere.ras.annotation
Annotation Type TraceOptions
-
@Retention(RUNTIME) @Target({TYPE,PACKAGE}) public @interface TraceOptions
TheTraceOptions
annotation can be used to declare which trace group a class (or classes in a package) should be asociated with. The annotation can also be used to declare whether or not debug traces should be cut when exceptions are explicitly thrown or caught.For example:
@TraceOptions(traceGroup = "MyTraceGroup", traceExceptionThrow = true) public class Foo {}
will associate the classFoo
with theMyTraceGroup
trace group and will cause debug traces to be added whenever an exception is explicitly thrown.
or:
@TraceOptions(traceGroups = { "BarGroup", "FooGroup" }, messageBundle = "com.ibm.bar") public class Bar {}
will associate the classBar
with the trace groupsBarGroup
andFooGroup
if the underlying trace runtime supports multiple groups. If not, only the first trace group listed will be used. The message bundle "com.ibm.bar" will be used for messages.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
messageBundle
boolean
traceExceptionHandling
boolean
traceExceptionThrow
java.lang.String
traceGroup
java.lang.String[]
traceGroups
-