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.

57 lines
1.5 KiB

  1. //****************************************************************************
  2. //
  3. // Module: ULS.DLL
  4. // File: debug.cpp
  5. // Content: This file contains miscellaneous debug routines.
  6. // History:
  7. // Thu 08-Apr-1993 09:43:46 -by- Viroon Touranachun [viroont]
  8. //
  9. //****************************************************************************
  10. #include "ulsp.h"
  11. #include "debug.h"
  12. #ifdef DEBUG
  13. UINT DbgUlsTrace(LPCTSTR pszFormat, ...)
  14. {
  15. if (F_ZONE_ENABLED(ghZoneUls, DM_TRACE))
  16. {
  17. va_list v1;
  18. va_start(v1, pszFormat);
  19. DbgPrintf(TEXT("ULS:Trace"), (PSTR) pszFormat, v1);
  20. va_end(v1);
  21. }
  22. return 0;
  23. }
  24. VOID DbgMsgUls(ULONG iZone, CHAR *pszFormat, ...)
  25. {
  26. if (F_ZONE_ENABLED(ghZoneUls, iZone))
  27. {
  28. PCSTR pszPrefix;
  29. switch (iZone)
  30. {
  31. case DM_ERROR: pszPrefix = "ILS:Error"; break;
  32. case DM_WARNING: pszPrefix = "ILS:Warning"; break;
  33. case DM_TRACE: pszPrefix = "ILS:Trace"; break;
  34. case DM_REFCOUNT: pszPrefix = "ILS:RefCount"; break;
  35. case ZONE_KA: pszPrefix = "ILS:KA"; break;
  36. case ZONE_FILTER: pszPrefix = "ILS:Filter"; break;
  37. case ZONE_REQ: pszPrefix = "ILS:Request"; break;
  38. case ZONE_RESP: pszPrefix = "ILS:Response"; break;
  39. case ZONE_CONN: pszPrefix = "ILS:Connection"; break;
  40. default: pszPrefix = "ILS:???"; break;
  41. }
  42. va_list args;
  43. va_start(args, pszFormat);
  44. DbgPrintf(pszPrefix, pszFormat, args);
  45. va_end(args);
  46. }
  47. }
  48. #endif // DEBUG