The com.informix.udr.UDRTraceable

Note: UDRTraceable is deprecated. It is recommended you use the SLF4J API to log messages for your application. See Traceable Events for more information.
The UDRTraceable interface supports zone-based tracing. A trace zone is a conceptual code component. For example, you can put all UDRs in the same zone and all general-purpose Java™ applications in another. Each zone can have its own trace level that dictates the granularity of tracing. The zones form a hierarchy where subzones inherit the trace levels of their parents. You can define the zones, their hierarchical relationships, and trace levels with the following features:
  • The settings in the JVP property file (which the JVPPROPFILE configuration parameter specifies)
  • Calls to the UDRTraceable methods at program execution time
The UDRTraceable interface is defined as follows:
public interface UDRTraceable extends Traceable
{
   public static final int TRACE_OFF = 0;
   public static final int TRACE_MINIMAL = 1;
   public static final int TRACE_COARSE = 2;
   public static final int TRACE_MEDIUM = 3;
   public static final int TRACE_FINE = 4;
   public static final int TRACE_SUPERFINE = 5;
   
   int traceLevel(String zone);
   void traceSet(String zone, int level);
   void tracePrint(String zone, int level, String message);
The traceLevel() method returns the current trace-level setting for the given trace zone. The predefined trace levels are as follows.
Table 1. Predefined trace levels for the traceLevel() method
Trace-level constant Description
TRACE_OFF No trace output is generated
TRACE_MINIMAL Basic tracing
TRACE_COARSE Coarse-grained tracing
TRACE_MEDIUM Medium-grained tracing
TRACE_FINE Fine-grained tracing
TRACE_SUPERFINE For the trace sessions that require all possible details

The traceSet() method sets the specified trace zone to the specified trace level.

The tracePrint() method sends the specified message to the JVP log file if the trace zone has a trace level that is greater than or equal to the level parameter. The JVPLOGFILE configuration parameter specifies the JVP log file name.