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.

98 lines
2.7 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. perfmsg.h
  5. Abstract:
  6. This file provides the macros and definitions used by the extensible
  7. counters for reporting events to the event logging facility
  8. Author:
  9. Bob Watson (a-robw) 5 Oct 92
  10. Revision History:
  11. --*/
  12. #ifndef _PERFMSG_H_
  13. #define _PERFMSG_H_
  14. //
  15. // Report error message ID's for Counters
  16. //
  17. #define APP_NAME "rasctrs"
  18. //
  19. // The constant below defines how many (if any) messages will be reported
  20. // to the event logger. As the number goes up in value more and more events
  21. // will be reported. The purpose of this is to allow lots of messages during
  22. // development and debugging (e.g. a message level of 3) to a minimum of
  23. // messages (e.g. operational messages with a level of 1) or no messages if
  24. // message logging inflicts too much of a performance penalty. Right now
  25. // this is a compile time constant, but could later become a registry entry.
  26. //
  27. // Levels: LOG_NONE = No event log messages ever
  28. // LOG_USER = User event log messages (e.g. errors)
  29. // LOG_DEBUG = Minimum Debugging
  30. // LOG_VERBOSE = Maximum Debugging
  31. //
  32. #define LOG_NONE 0
  33. #define LOG_USER 1
  34. #define LOG_DEBUG 2
  35. #define LOG_VERBOSE 3
  36. #define MESSAGE_LEVEL_DEFAULT LOG_USER
  37. // define macros
  38. //
  39. // Format for event log calls without corresponding insertion strings is:
  40. // REPORT_xxx (message_value, message_level)
  41. // where:
  42. // xxx is the severity to be displayed in the event log
  43. // message_value is the numeric ID from above
  44. // message_level is the "filtering" level of error reporting
  45. // using the error levels above.
  46. //
  47. // if the message has a corresponding insertion string whose symbol conforms
  48. // to the format CONSTANT = numeric value and CONSTANT_S = string constant for
  49. // that message, then the
  50. //
  51. // REPORT_xxx_STRING (message_value, message_level)
  52. //
  53. // macro may be used.
  54. //
  55. //
  56. // REPORT_SUCCESS was intended to show Success in the error log, rather it
  57. // shows "N/A" so for now it's the same as information, though it could
  58. // (should) be changed in the future
  59. //
  60. #define REPORT_SUCCESS(i,l)
  61. #define REPORT_INFORMATION(i,l)
  62. #define REPORT_WARNING(i,l)
  63. #define REPORT_ERROR(i,l)
  64. #define REPORT_INFORMATION_DATA
  65. #define REPORT_WARNING_DATA(i,l,d,s)
  66. #define REPORT_ERROR_DATA(i,l,d,s)
  67. // External Variables
  68. extern HANDLE hEventLog; // handle to event log
  69. extern DWORD dwLogUsers; // counter of event log using routines
  70. extern DWORD MESSAGE_LEVEL; // event logging detail level
  71. #endif //_PERFMSG_H_
  72.