Sun Identity Manager 8.1 システム管理者ガイド

情報トレースポイントの使用方法

使用するコードに情報トレースポイントを追加する前に、これらのガイドラインをお読みください。

次に、簡易情報トレース文の例を示します。この例では、次の CLASS 変数が宣言されているものとします。

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

例 5–3 情報トレースポイントの一例

_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); 
}