KB Article #102487

How to change Tracing level in IME on Windows

How to change Tracing level in IME on Windows
This article was previously published as ID#29227


Summary:
How to change tracing level in IME version 5.0.5/5.5 on the Windows platform. This option can be set while IME is running or as a start-up option.

Symptom:
The default tracing option for IME is INFO. With this mode, only INFO and ERROR messages are logged in trace files. For troubleshooting, it’s more helpful, if the tracing level is changed to DEBUG.

Detailed Information:
There are two levels of tracing in IME for all customer deployments: INFO and DEBUG. The amount of debugging information available in the IME trace files is maximized with the DEBUG trace level. The recommended tracing level for all deployments is INFO. In case of troubleshooting, it is recommended that the tracing level be changed to DEBUG.

The trace files are default located in C:\IME\logs directory by default. There is a separate trace file for each component in IME. For example, for Account Manager, its IMEAccount_3482.trc, where 3482 represents the process ID for Account Manager process. Every time IME is restarted, processes get assigned a new process ID and hence new trace file gets generated for each restarted component.

In IME 5.0.5, the IME HTTP Gateway trace file is found in the C:\WINNT directory. The IME Remote Gateway (IME5.0.5 only) will also log to this file (e.g. IMEHttpGateway.exe_322.trc).

In IME 5.5 the HTTP Gateway trace file is in the same directory as the other IME components, C:\IME\logs.

Resolution:
There are two options to change the tracing level.

1. As a startup option
2. As a run-time option

Startup option: This option is recommended for development setups and on systems where the tracing level change requirement is ongoing. To set this option:

· Login to the IME system as an admin account
· Open the control panael
· Select "System"
· Select the "Advanced" tab
· Select "Environment Variables"
· Under "System Variables" add or alter the Variable Name
    TW_TRACE_LEVEL
  with a Variable Value of
    all=debug
· The other permitted option for tracing is “info”.
· Reboot your system to enable desired tracing.

Note that setting this environment variable will enable debug tracing only for locally running IME processes, so you may need to make this change on each server running an IME component as necessary.



Run-time option: This option is helpful especially on production environment where restart of IME system is not a practical/easy option. To set this option you may run the following commands from a command window. Possibly more simple is to create 2 batch files, one to turn on debug trace, one to turn off debug trace:

· Create the file C:\IME\start_debug.bat with the following contents:
REM ==========================================
REM File: start_debug.bat
REM Batch File to set Debug level trace for IME
REM Edit the IME install PATH below as necessary
REM You will usually need to run this twice
REM to see a DEBUG message on an idle system.
REM ==========================================
C:\IME\bin\PostaStart -corba_trace_level "All=debug"
pause
REM ==========================================
REM End of batch file
REM ==========================================

· The other permitted option for tracing is “info”.
· Run the batch file from either the command prompt or from Windows Explorer.
· This command will generate a process ID and the tracing level will be enabled as specified.
· To verify the tracing action, go to C:\IME\logs
· Open the latest IMEAccount_.trc file.
· Look for a similar statement in the last few lines as given below:

Wed Nov 27 15:07:27 2002 microsec: 729050, TID 26, DEBUG: IMEAccount, module=CORE: Setting level for module: ALL to: debug; in file: Compiler/ccTrace.cpp; at line: 496

· A similar script to stop Debug logging would be:
REM ==========================================
REM File: stop_debug.bat
REM Batch File to turn off Debug trace for IME
REM Edit the IME install PATH below as necessary
REM ==========================================
C:\IME\bin\PostaStart -corba_trace_level "All=info"
pause
REM ==========================================
REM End of batch file
REM ==========================================




· The option provided above will set the tracing level for all IME components on the given system. This is the usually recommended option. In case debugging level for only particular components needs to be changed, use following command, for example for the SMTPDelivery Extension:

C:\IME\bin\PostaStart -corba_trace_level 192.168.0.2 "SMTP-HTTPDeliveryExtension4_0" "ALL=debug"

· subsitute your IP address where the component is running.
· Name of the component would be e.g. AccountManager, PackageManager, etc. To get the complete list of all components and other options, use following command:

C:\IME\bin\PostaStart

NOTE: These commands or environment settings can be used to reset the tracing level to “info” after troubleshooting process has completed.

NOTE: The run-time tracing change is temporary. After restart of the IME server, the tracing level will revert back to the default “info” level. To have continued tracing in desired mode, refer to start-up option of tracing above.


Original Author:
Original Submitter: DKALT
Keywords: trace, debug, info, error, log, tracing, ime IME ID#29227