Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

228 lines
5.4 KiB

  1. /*
  2. - L O G I T . H
  3. -
  4. * Purpose:
  5. * Function and Macro definitions for logging module activity.
  6. *
  7. * Author: Glenn A. Curtis
  8. *
  9. * Comments:
  10. * 10/28/93 glennc original file.
  11. *
  12. */
  13. #ifndef LOGIT_H
  14. #define LOGIT_H
  15. #include <stdio.h>
  16. #include <string.h>
  17. #include <stdarg.h>
  18. #include <time.h>
  19. // #if DBG
  20. void LogInit(LPSTR Filename);
  21. void CDECL LogIt( LPSTR Filename, char *, ... );
  22. void LogTime(LPSTR Filename);
  23. DWORD LogIn( LPSTR Filename, char * );
  24. void LogOut( LPSTR Filename, char *, DWORD );
  25. // #else
  26. // #undef ENABLE_DEBUG_LOGGING
  27. // #endif // DBG
  28. /***********************************************************************
  29. * Logging macros for source file dnsapi.c *
  30. ***********************************************************************/
  31. #ifdef ENABLE_DEBUG_LOGGING
  32. #define DNSAPI_INIT() LogInit( "dnsapi.log" )
  33. #else
  34. #define DNSAPI_INIT()
  35. #endif
  36. #ifdef ENABLE_DEBUG_LOGGING
  37. #define DNSAPI_TIME() LogTime( "dnsapi.log" )
  38. #else
  39. #define DNSAPI_TIME()
  40. #endif
  41. #ifdef ENABLE_DEBUG_LOGGING
  42. #define DNSAPI_F1( a ) LogIt( "dnsapi.log", a )
  43. #else
  44. #define DNSAPI_F1( a )
  45. #endif
  46. #ifdef ENABLE_DEBUG_LOGGING
  47. #define DNSAPI_F2( a, b ) LogIt( "dnsapi.log", a, b )
  48. #else
  49. #define DNSAPI_F2( a, b )
  50. #endif
  51. #ifdef ENABLE_DEBUG_LOGGING
  52. #define DNSAPI_F3( a, b, c ) LogIt( "dnsapi.log", a, b, c )
  53. #else
  54. #define DNSAPI_F3( a, b, c )
  55. #endif
  56. #ifdef ENABLE_DEBUG_LOGGING
  57. #define DNSAPI_F4( a, b, c, d ) LogIt( "dnsapi.log", a, b, c, d )
  58. #else
  59. #define DNSAPI_F4( a, b, c, d )
  60. #endif
  61. #ifdef ENABLE_DEBUG_LOGGING
  62. #define DNSAPI_F5( a, b, c, d, e ) LogIt( "dnsapi.log", a, b, c, d, e )
  63. #else
  64. #define DNSAPI_F5( a, b, c, d, e )
  65. #endif
  66. #ifdef ENABLE_DEBUG_LOGGING
  67. #define DNSAPI_F6( a, b, c, d, e, f ) LogIt( "dnsapi.log", a, b, c, d, e, f )
  68. #else
  69. #define DNSAPI_F6( a, b, c, d, e, f )
  70. #endif
  71. #ifdef ENABLE_DEBUG_LOGGING
  72. #define DNSAPI_IN( a ) LogIn( "dnsapi.log", a )
  73. #else
  74. #define DNSAPI_IN( a )
  75. #endif
  76. #ifdef ENABLE_DEBUG_LOGGING
  77. #define DNSAPI_OUT( a, b ) LogOut( "dnsapi.log", a, b )
  78. #else
  79. #define DNSAPI_OUT( a, b )
  80. #endif
  81. /***********************************************************************
  82. * Logging macros for source file asyncreg.c *
  83. ***********************************************************************/
  84. #ifdef ENABLE_DEBUG_LOGGING
  85. #define ASYNCREG_INIT() LogInit( "asyncreg.log" )
  86. #else
  87. #define ASYNCREG_INIT()
  88. #endif
  89. #ifdef ENABLE_DEBUG_LOGGING
  90. #define ASYNCREG_TIME() LogTime( "asyncreg.log" )
  91. #else
  92. #define ASYNCREG_TIME()
  93. #endif
  94. #ifdef ENABLE_DEBUG_LOGGING
  95. #define ASYNCREG_F1( a ) LogIt( "asyncreg.log", a )
  96. #else
  97. #define ASYNCREG_F1( a )
  98. #endif
  99. #ifdef ENABLE_DEBUG_LOGGING
  100. #define ASYNCREG_F2( a, b ) LogIt( "asyncreg.log", a, b )
  101. #else
  102. #define ASYNCREG_F2( a, b )
  103. #endif
  104. #ifdef ENABLE_DEBUG_LOGGING
  105. #define ASYNCREG_F3( a, b, c ) LogIt( "asyncreg.log", a, b, c )
  106. #else
  107. #define ASYNCREG_F3( a, b, c )
  108. #endif
  109. #ifdef ENABLE_DEBUG_LOGGING
  110. #define ASYNCREG_F4( a, b, c, d ) LogIt( "asyncreg.log", a, b, c, d )
  111. #else
  112. #define ASYNCREG_F4( a, b, c, d )
  113. #endif
  114. #ifdef ENABLE_DEBUG_LOGGING
  115. #define ASYNCREG_F5( a, b, c, d, e ) LogIt( "asyncreg.log", a, b, c, d, e )
  116. #else
  117. #define ASYNCREG_F5( a, b, c, d, e )
  118. #endif
  119. #ifdef ENABLE_DEBUG_LOGGING
  120. #define ASYNCREG_F6( a, b, c, d, e, f ) LogIt( "asyncreg.log", a, b, c, d, e, f )
  121. #else
  122. #define ASYNCREG_F6( a, b, c, d, e, f )
  123. #endif
  124. #ifdef ENABLE_DEBUG_LOGGING
  125. #define ASYNCREG_IN( a ) LogIn( "asyncreg.log", a )
  126. #else
  127. #define ASYNCREG_IN( a )
  128. #endif
  129. #ifdef ENABLE_DEBUG_LOGGING
  130. #define ASYNCREG_OUT( a, b ) LogOut( "asyncreg.log", a, b )
  131. #else
  132. #define ASYNCREG_OUT( a, b )
  133. #endif
  134. /***********************************************************************
  135. * Logging macros for source file dynreg.c *
  136. ***********************************************************************/
  137. #ifdef ENABLE_DEBUG_LOGGING
  138. #define DYNREG_INIT() LogInit( "dynreg.log" )
  139. #else
  140. #define DYNREG_INIT()
  141. #endif
  142. #ifdef ENABLE_DEBUG_LOGGING
  143. #define DYNREG_TIME() LogTime( "dynreg.log" )
  144. #else
  145. #define DYNREG_TIME()
  146. #endif
  147. #ifdef ENABLE_DEBUG_LOGGING
  148. #define DYNREG_F1( a ) LogIt( "dynreg.log", a )
  149. #else
  150. #define DYNREG_F1( a )
  151. #endif
  152. #ifdef ENABLE_DEBUG_LOGGING
  153. #define DYNREG_F2( a, b ) LogIt( "dynreg.log", a, b )
  154. #else
  155. #define DYNREG_F2( a, b )
  156. #endif
  157. #ifdef ENABLE_DEBUG_LOGGING
  158. #define DYNREG_F3( a, b, c ) LogIt( "dynreg.log", a, b, c )
  159. #else
  160. #define DYNREG_F3( a, b, c )
  161. #endif
  162. #ifdef ENABLE_DEBUG_LOGGING
  163. #define DYNREG_F4( a, b, c, d ) LogIt( "dynreg.log", a, b, c, d )
  164. #else
  165. #define DYNREG_F4( a, b, c, d )
  166. #endif
  167. #ifdef ENABLE_DEBUG_LOGGING
  168. #define DYNREG_F5( a, b, c, d, e ) LogIt( "dynreg.log", a, b, c, d, e )
  169. #else
  170. #define DYNREG_F5( a, b, c, d, e )
  171. #endif
  172. #ifdef ENABLE_DEBUG_LOGGING
  173. #define DYNREG_F6( a, b, c, d, e, f ) LogIt( "dynreg.log", a, b, c, d, e, f )
  174. #else
  175. #define DYNREG_F6( a, b, c, d, e, f )
  176. #endif
  177. #ifdef ENABLE_DEBUG_LOGGING
  178. #define DYNREG_IN( a ) LogIn( "dynreg.log", a )
  179. #else
  180. #define DYNREG_IN( a )
  181. #endif
  182. #ifdef ENABLE_DEBUG_LOGGING
  183. #define DYNREG_OUT( a, b ) LogOut( "dynreg.log", a, b )
  184. #else
  185. #define DYNREG_OUT( a, b )
  186. #endif
  187. #endif