home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / bin / logger32 / readme.txt < prev    next >
Encoding:
Text File  |  1995-07-11  |  4.6 KB  |  119 lines

  1.                         Application WIN32 Logger
  2.                             32 bit version
  3.  
  4. Copyright(C) 1993-1995 Microsoft Corporation, All Rights Reserved.
  5.  
  6. What is Logger?
  7. ---------------
  8.  
  9. Logger is a tool that records the calls an application makes to the Win32 API 
  10. as well as callbacks that the Win32 system makes to the application.  The 
  11. output file produced by Logger is a list of the API called, the parameters 
  12. passed to the API and the return value from the API.  Logger is also capable 
  13. of timing these events and placing this information into the output file.
  14.  
  15. Getting Ready for Logger
  16. ------------------------
  17.  
  18. To use logger you will need the following binaries somewhere on your path - 
  19. apfcvt.exe, logger32.dll, zser32.dll, zdi32.dll, zdvapi32.dll, zernel32.dll
  20. and zrtdll.dll.  For each binary that you are interested in logging run 
  21. apfcvt.exe against it.  apfcvt.exe will modify the binary to dynamically
  22. link to the z-dlls rather than the actual Win32 dlls.  To see how to use 
  23. apfcvt.exe run "apfcvt -?" from the cmd line.
  24.  
  25. Customizing Logger
  26. ------------------
  27.  
  28. Logger does have some customizable options.  The following list is of key 
  29. entries in the system win.ini file and are each made under the section name 
  30. [logger].  Defaults are specified by braces like this {0} and need not be 
  31. entered in win.ini to get the listed functionality.
  32.  
  33.     DbgPort        {0}            log to the output file
  34.                   1            log to the debugger via OutputDebugString
  35.  
  36.     Timing        {0}            timing OFF
  37.                   1             timing ON
  38.  
  39.     Notes        {1}            record NOTES
  40.                   0             do not record NOTES
  41.  
  42.         Note: NOTES are API that logger is not capable of logging the 
  43.         parameters to so there is a NOTE: line placed in the output file 
  44.         to record the call to the API.
  45.  
  46.     APIOnly        {0}            record API and parameters
  47.                   1            record ONLY the API - no parameters
  48.  
  49.     LogSync        {0}            truncate output files when logger started
  50.                   1            Do NOT truncate output files when started
  51.  
  52.     TimerTicks    {0}            Times recorded are elapsed times
  53.                   1            Instead of elapsed times record current timer tick
  54.  
  55.     LogFile        filename     Filename to output logger information to. 
  56.                             {output32.log}
  57.  
  58.     DatFile        filename    Filename to output extra logger data to.
  59.                             {output32.dat}
  60.  
  61.         Note: LogFile and DatFile have no effect if LogSync = 1
  62.  
  63.     FlushAfter    # of bytes    The number of cached bytes at which a flush to disk 
  64.                             is done.  Making this number small makes it easier 
  65.                             to catch application problems but will increase run 
  66.                             time.
  67.  
  68.     Alias        {0}            No aliasing is done
  69.                  1            Aliasing on - aliasing will convert many object 
  70.                              handles to a more generic format to facilitate log 
  71.                              comparisons.  The format is a mnemonic name, an 
  72.                              underline character and a decimal number signifying
  73.                              the order the handle was allocated in. 
  74.  
  75.     LogObjects    0            Turns off GDI object expansion        
  76.                 1            Turns on GDI object expansion
  77.  
  78.         Note: LogObjects defaults to the opposite of Timing.
  79.  
  80. Putting It All Together
  81. -----------------------
  82.  
  83. After you binaries have been converted with apfcvt and you have placed the
  84. z-dlls and Logger32.dll in your path you create the logger output file by 
  85. simply running your application.  When you exit your application the record of
  86. your execution will be in the output file.  The format of logger lines are -
  87.  
  88.     xx![opt timing][line type]: [api name] [parameters]
  89.  
  90. where -
  91.  
  92.     xx                this is usually a hexadecimal nesting level number.  It can 
  93.                     also be    "++" to signify an informational line.
  94.  
  95.     [opt timing]    this is an 8 digit hexadecimal number representing either 
  96.                     elapsed time since the matching CALL line (see [line type]) 
  97.                     or the current timer tick depending on the value of 
  98.                     Logger.TimerTicks in win.ini.  This item will only appear 
  99.                     if Logger.Timing=1.
  100.  
  101.     [line type]      this tells what this line really is.  Possible values are -
  102.         
  103.         APICALL        record of an API call
  104.         APIRET        record of an APICALL returning (matched by level number)
  105.         MSGCALL        record of a callback to an application WNDPROC
  106.         MSGRET        record of a callback returning to the caller
  107.         ENUMCALL    record of a callback to an enumeration procedure
  108.         ENUMRET        record of a enumeration callback returning to enumerator
  109.         HOOKCALL    record of a callback to an application HOOKPROC
  110.         HOOKRET        record of a HOOKPROC returning
  111.  
  112.     [api name]        this is the API called if on an APICALL/RET line otherwise 
  113.                     it will be the hexadecimal representation of the address 
  114.                     of the function being called.
  115.  
  116.     [parameters]    all parameters are dumped as hexadecimal or strings.  Each 
  117.                     parameter is separated from the previous one by a space.  
  118.                     Structures are recorded inside a set of braces.
  119.