API to change trace setting

These APIs can be invoked by BTT Monitor tool to change the trace level dynamically.
Following are the APIs to change the trace settings:
  • Component trace setting:
    • public static synchronized void setTraceLevel(int level) sets the global trace level.

      Where setTraceLevel is used to change trace level dynamically.

    • public static synchronized void setTraceLevel(String component, boolean eanble,int level) sets the trace level for a specified component.

      Where setTraceLevel is used to change trace level dynamically.

    • public static   HashMap<String, TraceRequester> getComponentTraceSetting();
      public static   TraceRequster  getComponentTraceSetting(String component);
      Where getComponentTraceSetting is used to query the trace setting for components, and TraceRequester is a Java Bean, which stores the trace setting for one component.
  • Enable and Disable the trace target:
    public static boolean  getTraceTarget(int target)
    public static void  setTraceTarget(int target, boolean enabled)
    Note: The trace can be written to multiple targets at the same time.
  • Target constant:
    public static final short	TO_DISPLAY       =  0x0001;
    public static final short	TO_FILE          =  0x0002;
    public static final short	TO_WAS           =  0x0004;
    public static final short	TO_COMMONLOGGING =  0x0008;
  • TID (Terminal ID)