Assembly: IBM.CTG.Client (in IBM.CTG.Client.dll) Version: 1.0.0.0
Syntax
C# |
---|
public sealed class Trace |
Visual Basic (Declaration) |
---|
Public NotInheritable Class Trace |
Visual C++ |
---|
public ref class Trace sealed |
Remarks
Trace in ctgclient.dll and IBM.CTG.Client.dll can be enabled in three ways.
Enabling trace using an application configuration file
Trace can be enabled using the CtgTrace trace switch in an application configuration file. The switch allows
the trace level to be specified as a TraceLevel value, a TraceLevel
value, or an integer between 0 and 4 inclusive. The switch also supports an optional fileName attribute, which
can be set to the name of a file to write ctgclient.dll trace information to.
The following example shows how to enable trace at CtgTrcLevel4, using the file
traceFile.trc as the ctgclient.dll trace destination.
![]() | |
---|---|
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.diagnostics> <switches> <add name="CtgTrace" value="CtgTrcLevel4" fileName="traceFile.trc"/> </switches> </system.diagnostics> </configuration> |
Enabling trace using the Trace class
The Trace class provides the following members for controlling trace:
Enabling trace using environment variables
The trace level can be controlled by setting the environment variable CTG_CLIENT_TRACE_LEVEL to an integer value
between 0 and 4 inclusive. The name of the file to write ctgclient.dll trace information to can be set using the
environment variable CTG_CLIENT_TRACE_FILE.