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.

48 lines
1.1 KiB

  1. /*--
  2. Copyright (c) 1995-1998 Microsoft Corporation
  3. Module Name: LOG.H
  4. Author: John Spaith
  5. Abstract: Logging functions
  6. --*/
  7. // If registry key doesn't exist, this will be the largest we'll let log grow to
  8. class CHttpRequest; // forward declaration
  9. // Right now we assume only one object handles all requests.
  10. #ifdef WEB_SERVER_LOGGING
  11. class CLog
  12. {
  13. private:
  14. HANDLE m_hLog;
  15. DWORD_PTR m_dwMaxFileSize; // Max log can grow before it's rolled over
  16. DWORD_PTR m_dwFileSize; // Current file lenght
  17. CRITICAL_SECTION m_CritSection;
  18. WCHAR lpszCurrentLog[MAX_PATH+1];
  19. WCHAR lpszPrevLog[MAX_PATH+1];
  20. public:
  21. CLog(DWORD_PTR dwMaxFileLen, WCHAR * lpszLogDir);
  22. ~CLog();
  23. void WriteData(PSTR wszData, DWORD_PTR dwToWrite);
  24. void WriteLog(CHttpRequest* pThis);
  25. void WriteEvent(DWORD dwEvent,...);
  26. };
  27. #else
  28. class CLog
  29. {
  30. public:
  31. CLog(DWORD_PTR dwMaxFileLen, WCHAR * lpszLogDir) {}
  32. ~CLog() {}
  33. void WriteData(PSTR wszData, DWORD_PTR dwToWrite) {}
  34. void WriteLog(CHttpRequest* pThis) {}
  35. void WriteEvent(DWORD dwEvent,...){}
  36. };
  37. #endif