Source code of Windows XP (NT5)
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.

42 lines
1.6 KiB

  1. #pragma once
  2. #ifdef __cplusplus
  3. extern "C" {
  4. #endif
  5. #include <windows.h>
  6. #include <winbase.h>
  7. #include <rtutils.h>
  8. #define TL_ERROR ((DWORD)0x00010000 | TRACE_USE_MASK)
  9. #define TL_WARN ((DWORD)0x00020000 | TRACE_USE_MASK)
  10. #define TL_INFO ((DWORD)0x00040000 | TRACE_USE_MASK)
  11. // #define TL_TRACE ((DWORD)0x00080000 | TRACE_USE_MASK)
  12. // #define TL_EVENT ((DWORD)0x00100000 | TRACE_USE_MASK)
  13. BOOL TRACELogRegister(LPCTSTR szName);
  14. void TRACELogDeRegister();
  15. void TRACELogPrint(IN DWORD dwDbgLevel, IN LPCSTR DbgMessage, IN ...);
  16. #define LOG_ERROR(pszFmt) TRACELogPrint(TL_ERROR, pszFmt)
  17. #define LOG_ERROR1(pszFmt, arg1) TRACELogPrint(TL_ERROR, pszFmt, arg1)
  18. #define LOG_ERROR2(pszFmt, arg1, arg2) TRACELogPrint(TL_ERROR, pszFmt, arg1, arg2)
  19. #define LOG_ERROR3(pszFmt, arg1, arg2, arg3) TRACELogPrint(TL_ERROR, pszFmt, arg1, arg2, arg3)
  20. #define LOG_WARN(pszFmt) TRACELogPrint(TL_WARN, pszFmt)
  21. #define LOG_WARN1(pszFmt, arg1) TRACELogPrint(TL_WARN, pszFmt, arg1)
  22. #define LOG_WARN2(pszFmt, arg1, arg2) TRACELogPrint(TL_WARN, pszFmt, arg1, arg2)
  23. #define LOG_WARN3(pszFmt, arg1, arg2, arg3) TRACELogPrint(TL_WARN, pszFmt, arg1, arg2, arg3)
  24. #define LOG_INFO(pszFmt) TRACELogPrint(TL_INFO, pszFmt)
  25. #define LOG_INFO1(pszFmt, arg1) TRACELogPrint(TL_INFO, pszFmt, arg1)
  26. #define LOG_INFO2(pszFmt, arg1, arg2) TRACELogPrint(TL_INFO, pszFmt, arg1, arg2)
  27. #define LOG_INFO3(pszFmt, arg1, arg2, arg3) TRACELogPrint(TL_INFO, pszFmt, arg1, arg2, arg3)
  28. #ifdef __cplusplus
  29. }
  30. #endif