By using trace by component, you can decide whether to enable trace for a specific component. BTT trace supports self-defined component ID.
<traceRequester id="#CHA" trace="yes" traceLevel="INFO"/> <traceRequester id="#BTT_APPL" trace="yes" traceLevel="DEBUG"/>
BTT trace also supports trace by sub-component. The naming rule for sub-component is to separate the name of the main component and the name of the sub-component with a . sign.
<traceRequester id="#Invoker" trace="yes" traceLevel="INFO"/> <traceRequester id="#Invoker.WebService" trace="no" traceLevel="DEBUG"/> <traceRequester id="#Invoker.EJB" trace="yes" traceLevel="ERROR"/>
The trace setting of the sub-component can override that of the main component. When the trace setting of sub component is not defined in btt.xml, BTT trace will use the setting of the main component automatically.
BTTLog log=BTTLogFactory.getLog(Constants.CHACOMPID); if (log.doError()) log.error(errMsg); if (Trace.doInfo()) Trace.info(“CHA information .....");
if (Trace.doTrace(Constants.CHACOMPID,Trace.High,Trace.Error)) Trace.trace(Constants.CHACOMPID,Trace.High,Trace.Error,Settings.getTID(),errMsg);
Basic BTT exception classes are provided for other BTT components to handle the exceptions. Besides the DSEException, BTT also provides another basic exception DSERuntimeException, which is extended from jDSERuntimeException. For DSERuntimeException, the exception can be thrown and handled by JVM automatically.