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.

54 lines
1.2 KiB

  1. /*++
  2. Module Name
  3. bgdebug.h
  4. Description
  5. Defines functions used for debugging
  6. Note
  7. Revised based on msplog.h which is not available to bridge test app
  8. --*/
  9. #ifndef _BGDEBUG_H
  10. #define _BGDEBUG_H
  11. typedef enum EVENT_TYPE
  12. {
  13. BG_TE,
  14. BG_CS,
  15. BG_CME,
  16. BG_PE
  17. }EVENT_TYPE;
  18. #define BG_ERROR ((DWORD)0x00010000 | TRACE_USE_MASK)
  19. #define BG_WARN ((DWORD)0x00020000 | TRACE_USE_MASK)
  20. #define BG_INFO ((DWORD)0x00040000 | TRACE_USE_MASK)
  21. #define BG_TRACE ((DWORD)0x00080000 | TRACE_USE_MASK)
  22. #define BG_EVENT ((DWORD)0x00100000 | TRACE_USE_MASK)
  23. BOOL BGLogRegister(LPCTSTR szName);
  24. void BGLogDeRegister();
  25. void BGLogPrint(DWORD dwDbgLevel, LPCSTR DbgMessage, ...);
  26. void BGLogEvent (EVENT_TYPE EventType, int event);
  27. #ifdef BGDEBUG
  28. #define BGLOGREGISTER(arg) BGLogRegister(arg)
  29. #define BGLOGDEREGISTER() BGLogDeRegister()
  30. #define LOG(arg) BGLogPrint arg
  31. #define LOGEvent(arg) BGLogEvent arg
  32. #else // BGDEBUG
  33. #define BGLOGREGISTER(arg)
  34. #define BGLOGDEREGISTER()
  35. #define LOG(arg)
  36. #define LOGEvent(arg)
  37. #endif // BGDEBUG
  38. #endif // _BGDEBUG_H_