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.

108 lines
5.6 KiB

  1. //-----------------------------------------------------------------
  2. // LogOpts.h - logging options
  3. //-----------------------------------------------------------------
  4. #ifdef MAKE_LOG_STRINGS // this file in #include-ed twice
  5. #define BEGIN_LOG_OPTIONS() static const LOGNAMEINFO LogNames[] = {
  6. #define LOGOPT(val, key, desc) {key, desc},
  7. #define END_LOG_OPTIONS() };
  8. #else
  9. #define BEGIN_LOG_OPTIONS() enum LogOptions {
  10. #define LOGOPT(val, key, desc) val,
  11. #define END_LOG_OPTIONS() };
  12. #endif
  13. //-----------------------------------------------------------------
  14. BEGIN_LOG_OPTIONS()
  15. //---- log options ----
  16. LOGOPT(LO_BREAK, "Break", "Controls whether DebugBreak()'s are enabled")
  17. LOGOPT(LO_CONSOLE, "Console", "log msgs to the debugger console")
  18. LOGOPT(LO_LOGFILE, "LogFile", "log msgs to c:\themes.log")
  19. LOGOPT(LO_TIMERID, "TimerId", "msgs contain a relative timer")
  20. LOGOPT(LO_CLOCKID, "ClockId", "msgs contain the clock time")
  21. LOGOPT(LO_SRCID, "SrcId", "msgs contain their source file name & line number")
  22. LOGOPT(LO_APPID, "AppId", "msgs contain their app name")
  23. LOGOPT(LO_THREADID, "ThreadId", "msgs contain their thread id")
  24. LOGOPT(LO_USERCOUNT, "UserCount", "msgs contain open USER handle count")
  25. LOGOPT(LO_GDICOUNT, "GdiCount", "msgs contain open GDI handle count")
  26. LOGOPT(LO_MEMUSAGE, "MemUsage", "msgs contain memory usage")
  27. LOGOPT(LO_HEAPCHECK, "HeapCheck", "heap is validated as each msg is displayed")
  28. LOGOPT(LO_SHUTDOWN, "ShutDown", "Force early uxtheme ShutDown() code on top win close")
  29. //---- msg filter presets ----
  30. LOGOPT(LO_ALL, "All", "turn on/off all msg filters")
  31. //---- msg filters (*** MUST ADD TO LOG_XXX DEFINES BELOW ***) ----
  32. LOGOPT(LO_ASSERT, "Assert", "log assert msg & DebugBreak()")
  33. LOGOPT(LO_ERROR, "Error", "log error msg & DebugBreak()")
  34. LOGOPT(LO_ALWAYS, "Always", "always log but don't break")
  35. LOGOPT(LO_PERF, "Perf", "perf related msgs")
  36. LOGOPT(LO_PARAMS, "Params", "log bad API params")
  37. LOGOPT(LO_TMAPI, "TMAPI", "monitor all uxthem API entry/exit")
  38. LOGOPT(LO_TMLOAD, "TMLoad", "track theme file load/unloads")
  39. LOGOPT(LO_TMCHANGE, "TMChange", "monitor events during theme load/unloads")
  40. LOGOPT(LO_TMCHANGEMSG, "TMChangeMsg", "monitor msgs sent/received during theme changes")
  41. LOGOPT(LO_TMSTARTUP,"TMStartUp", "log thread/process startup/shutdown calls")
  42. LOGOPT(LO_TMOPEN, "TMOPEN", "_OpenThemeData() & CloseThemeData() calls")
  43. LOGOPT(LO_TMHANDLE, "TMHANDLE", "track calls to open/close theme file handles")
  44. LOGOPT(LO_TMBITMAP, "TMBITMAP", "track calls to bitmap creation and use")
  45. LOGOPT(LO_TMBRUSHES,"TMBRUSHES", "track calls to brushes creation and use")
  46. LOGOPT(LO_TM, "TM", "general theme manager events")
  47. LOGOPT(LO_CACHE, "Cache", "trace Caching API's")
  48. LOGOPT(LO_RFBUG, "RfBug", "trace info relating to roland's current bug")
  49. LOGOPT(LO_TILECNT, "TileCnt", "count # of tiling bitblt calls needed")
  50. LOGOPT(LO_BADHTHEME,"BadHTheme", "log any illegal HTHEME handles in public api's")
  51. LOGOPT(LO_WINDUMP, "WinDump", "dump of windows by process")
  52. LOGOPT(LO_COMPOSITE,"Composite", "WS_EX_COMPOSITED related processing")
  53. LOGOPT(LO_CAPTION, "Caption", "Experimental caption drawing")
  54. LOGOPT(LO_NCATTACH, "NCAttach", "monitor events during NC window attach/detach")
  55. LOGOPT(LO_NCMSGS, "NCMsgs", "monitor all nc theme msgs that we process")
  56. LOGOPT(LO_NCMETRICS, "NCMetrics", "info about NC metrics calcs")
  57. LOGOPT(LO_NCTRACE, "NCTrace", "entry/exit tracing in key NC functions")
  58. END_LOG_OPTIONS()
  59. //---------------------------------------------------------------------------
  60. #undef BEGIN_LOG_OPTIONS
  61. #undef LOGOPT
  62. #undef END_LOG_OPTIONS
  63. //---------------------------------------------------------------------------
  64. #define LOGPARAMS __FILE__, __LINE__
  65. //---- use these msg filters for calls to Log() ----
  66. #define LOG_ASSERT LO_ASSERT, LOGPARAMS, 0
  67. #define LOG_ERROR LO_ERROR, LOGPARAMS, 0
  68. #define LOG_ALWAYS LO_ALWAYS, LOGPARAMS, 0
  69. #define LOG_PERF LO_PERF, LOGPARAMS, 0
  70. #define LOG_PARAMS LO_PARAMS, LOGPARAMS, 0
  71. #define LOG_TMAPI LO_TMAPI, LOGPARAMS, 0
  72. #define LOG_TMLOAD LO_TMLOAD, LOGPARAMS, 0
  73. #define LOG_TMSTARTUP LO_TMSTARTUP, LOGPARAMS, 0
  74. #define LOG_TMCHANGE LO_TMCHANGE, LOGPARAMS, 0
  75. #define LOG_TMCHANGEMSG LO_TMCHANGEMSG, LOGPARAMS, 0
  76. #define LOG_TMOPEN LO_TMOPEN, LOGPARAMS, 0
  77. #define LOG_TMHANDLE LO_TMHANDLE, LOGPARAMS, 0
  78. #define LOG_TMBITMAP LO_TMBITMAP, LOGPARAMS, 0
  79. #define LOG_TMBRUSHES LO_TMBRUSHES, LOGPARAMS, 0
  80. #define LOG_TM LO_TM, LOGPARAMS, 0
  81. #define LOG_CACHE LO_CACHE, LOGPARAMS, 0
  82. #define LOG_RFBUG LO_RFBUG, LOGPARAMS, 0
  83. #define LOG_TILECNT LO_TILECNT, LOGPARAMS, 0
  84. #define LOG_BADHTHEME LO_BADHTHEME, LOGPARAMS, 0
  85. #define LOG_WINDUMP LO_WINDUMP, LOGPARAMS, 0
  86. #define LOG_COMPOSITE LO_COMPOSITE, LOGPARAMS, 0
  87. #define LOG_CAPTION LO_CAPTION, LOGPARAMS, 0
  88. #define LOG_NCATTACH LO_NCATTACH, LOGPARAMS, 0
  89. #define LOG_NCMSGS LO_NCMSGS, LOGPARAMS, 0
  90. #define LOG_NCMETRICS LO_NCMETRICS, LOGPARAMS, 0
  91. #define LOG_NCTRACE LO_NCTRACE, LOGPARAMS, 0
  92. //---------------------------------------------------------------------------