Sun Identity Manager 8.1 System Administrator's Guide

Using Information Trace Points

Consider these guidelines before adding information trace points to your code:

Following is an example of a simple information trace statement. For this example, assume the following CLASS variables are declared.

private static final String CLASS = 
"com.waveset.adapter.MyResourceAdapter"; 
protected static Trace _trace = Trace.getTrace();

Example 5–3 Information Trace Point Example

_trace.info(_trace.LEVEL3, CLASS, METHOD, Some Message);
WavesetResult result = new WavesetResult(); 
try {   
   someMethod(); 
}  catch(Exception e) {   
   String msg = Some Error Message;   
   WavesetException we = new Waveset(msg, e);   
   _trace.caught(_trace.LEVEL3, CLASS, METHOD, e);   
   result.addException(we); 
}