Previous Topic Next topic Print topic


To enable CTF tracing

  1. Set the MFTRACE_CONFIG environment variable to point to the configuration file, before you invoke the application. For example:
    set MFTRACE_CONFIG=c:\ctf\ctf.cfg
  2. Specify the format of CTF trace files you require by adding the appropriate lines in the configuration file ctf.cfg, or, if developing .NET managed code, a configuration file app.cfg located in the same folder as the associated app.exe file, such as:
    mftrace.dest = binfile
    mftrace.emitter.binfile#location  = c:\logs
    mftrace.level.mf.rts              = info
    mftrace.comp.mf.rts#pgm           = true
    mftrace.comp.mf.rts#pgmload       = true
    mftrace.comp.mf.rts#syspgm        = true
  3. Set the MFTRACE_LOGS environment variable to specify the location in which to create the CTF log files. If MFTRACE_LOGS is not set, the current folder is used.
    Note: The Net Express command prompt, 32-bit, sets MFTRACE_LOGS to %PUBLIC%\Micro Focus\MFTRACE\Logs. The Net Express command prompt, 64-bit sets MFTRACE_LOGS to %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\Base\MFTRACE\Logs.
  4. Run the application from the environment you set up.
  5. If you are using the .NET environment, instead of setting the MFTRACE_CONFIG variable you can configure CTF tracing in an app.config file in the same folder as its associated app.exe file. The configuration statements must be inserted in an <mftrace_config> section in the <configSections> as CDATA. For example:
    <?xml version ="1.0"?>
      <configuration>
        <configSections>
          <sectionGroup name="MicroFocus.COBOL.Tracing">
            <section name="mftrace_config"
             type="MicroFocus.COBOL.Runtime.CdataSectionHandler,
             MicroFocus.COBOL.Runtime.Win32,Version=4.0.0.0,Culture=neutral,
             PublicKeyToken=0412c5e0b2aaa8f0" />
          </sectionGroup>
        </configSections>
        <MicroFocus.COBOL.Tracing>
          <mftrace_config>
            <![CDATA[>
    mftrace.dest                           = binfile
    mftrace.emitter.binfile#location       = c:\logs
    mftrace.level.mf.rts                   = info
    mftrace.comp.mf.rts#pgm                = true
    mftrace.comp.mf.rts#pgmload            = true
    mftrace.comp.mf.rts#syspgm             = true
            <]]>
          </mftrace_config>
        </MicroFocus.COBOL.Tracing>
      </configuration>
    
    Note: If the MFTRACE_CONFIG variable is set, CTF uses it in preference to an app.config file.
Previous Topic Next topic Print topic