Changeset 2061 for trunk/include/misc.h


Ignore:
Timestamp:
Dec 12, 1999, 3:32:38 PM (26 years ago)
Author:
sandervl
Message:

added support for private logfiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/misc.h

    r1953 r2061  
    1 /* $Id: misc.h,v 1.11 1999-12-03 01:20:02 phaller Exp $ */
     1/* $Id: misc.h,v 1.12 1999-12-12 14:31:29 sandervl Exp $ */
    22
    33/*
     
    3131
    3232#ifdef DEBUG
     33#ifdef PRIVATE_LOGGING
     34  //To use private dll logging, define PRIVATE_LOGGING and
     35  //add Open/ClosePrivateLogFiles (see below) functions to the dll
     36  //to open close the private logfile. The logfile handle should
     37  //be stored in the _privateLogFile variable
     38  //dprintf can be called like this:
     39  //dprintf((LOG, "PE file           : %s", szFileName));
     40  #define LOG             (void*)_privateLogFile
     41  #define dprintf(a)      WritePrivateLog a
     42  #define dprintfGlobal(a)      WriteLog a
     43#else
    3344  #define dprintf(a)      WriteLog a
     45#endif
    3446  #define eprintf(a)      WriteLog a ; WriteLogError a
    3547  #define dassert(a, b)   if(!(a)) WriteLogError b
     
    3749
    3850#ifdef DEBUG_ENABLELOG_LEVEL2
    39   #define dprintf2(a)     WriteLog a
     51#ifdef PRIVATE_LOGGING
     52  #define dprintf2(a)      WritePrivateLog a
     53#else
     54  #define dprintf2(a)      WriteLog a
     55#endif
    4056#else
    4157  #define dprintf2(a)
     
    4359
    4460#else
     61  #define dprintfGlobal(a)
    4562  #define dprintf(a)
    4663  #define dprintf2(a)
     
    6784
    6885int  SYSTEM WriteLog(char *tekst, ...);
     86int  SYSTEM WritePrivateLog(void *logfile, char *tekst, ...);
    6987
    7088int  SYSTEM WriteLogError(char *tekst, ...);
     
    7896                          ...);
    7997
     98//To use private logfiles for dlls, you must have these functions and call
     99//them when the dll is loaded (open) and the exitlist handler is called (close)
     100void OpenPrivateLogFiles();
     101void ClosePrivateLogFiles();
    80102
    81103#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.