   =========================================================================
                             M I C R O   F O C U S
 
                      S E R V E R   E X P R E S S  5.0
   =========================================================================

           Consolidated Tracing Facility - C Demonstration Program
           =======================================================

   TABLE OF CONTENTS
   =================
       INSTRUCTIONS

   INSTRUCTIONS
   ============

   1. Open a Server Express command prompt, create a new directory for
      the Consolidated Tracing Facility C demonstration program, and
      change directory to it.

   2. Copy all the files from the directory containing this demonstration 
      program to the new directory. The demonstration program files are in
      $COBDIR\demo\ctf\c by default.

   3. Enter the following command to compile the sample program to create 
      the ctfdemo executable:

        cob -x -CC -I$COBDIR/include ctfdemo.c

   4. Enter the following command to run ctfdemo:

        ctfdemo

      The ctfdemo program runs, but no trace information is produced. You 
      can confirm that no trace information has been produced by checking 
      that there are no .log files in the current directory.

      To produce trace information you need to set the MFTRACE_CONFIG 
      environment variable and make sure that the ctf.cfg configuration 
      file contains the required entries.

   5. Enter the following command to set the MFTRACE_CONFIG environment 
      variable to point at the ctf.cfg file in the current directory:

        export MFTRACE_CONFIG=$PWD/ctf.cfg

   6. Edit ctf.cfg to uncomment the following lines by deleting the # from 
      column 1 of each line:

        #mftrace.level                = info
        #mftrace.comp.mf.demo#apples  = true
        #mftrace.comp.mf.demo#bananas = true
        #mftrace.comp.mf.demo#oranges = true

   7. Enter the following command to run ctfdemo again:

        ctfdemo

      ctfdemo runs and produces trace information. The configuration entries
      in ctf.cfg cause the maximum amount of trace records to be produced. 
      To reduce the amount of trace records produced you can do the 
      following:

       - change the 'mftrace.level' value to 'warn' or 'error'. This 
         indicates that you only want tracing records for warnings or 
         errors.

       - comment out one or more of the 'mftrace.comp.mf.demo#' component 
         properties. This indicates that you only want tracing records for 
         the components that are not commented out.

      See the comments in the do_processing function of ctfdemo.c for more
      details.

   =========================================================================
   Micro Focus is a registered trademark, and Server Express is a trademark,
   of Micro Focus International Limited. All other trademarks are the
   property of their respective owners.
   =========================================================================
   Copyright (C) 2006 Micro Focus International Ltd.
