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.

32 lines
1021 B

  1. #if !defined(AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_)
  2. #define AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_
  3. //***************************************************************************
  4. //
  5. // judyp May 1999
  6. //
  7. //***************************************************************************
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11. class CLogger
  12. {
  13. public:
  14. CLogger(LPCTSTR lpctstrFileName, bool bAppend = true);
  15. ~CLogger();
  16. int LogTCHAR(LPCTSTR lpctstrOut);
  17. int LogULONG(ULONG uLong, bool bHex = true);
  18. int LogULONG64(ULONG64 uLong64, bool bHex = true);
  19. int LogGUID(GUID Guid);
  20. int LogEventTraceProperties(PEVENT_TRACE_PROPERTIES pProps);
  21. int LogTime(time_t &Time);
  22. void Flush() {m_pPersistor->Stream().flush();}
  23. HRESULT GetOpenStatus() {return m_hr;}
  24. private:
  25. CPersistor *m_pPersistor;
  26. char *m_sFileName;
  27. HRESULT m_hr;
  28. };
  29. #endif // !defined(AFX_LOGGER_H__74C9CD33_EC48_11D2_826A_0008C75BFC19__INCLUDED_)