PhmsLogger.h 566 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include "Poco/Exception.h"
  3. #include "Poco/Mutex.h"
  4. #include "string"
  5. using Poco::Exception;
  6. using Poco::Mutex;
  7. using namespace std;
  8. class CPhmsLogger
  9. {
  10. private:
  11. CPhmsLogger(void);
  12. ~CPhmsLogger(void);
  13. private:
  14. static CPhmsLogger* m_pPhmsLogger;
  15. static Mutex m_mutex;
  16. public:
  17. static CPhmsLogger* GetPhmsLogger();
  18. static void ReleasePhmsLogger();
  19. void WriteLog(string stringText, const char* stringFunction, const char* stringFile, int nLine);
  20. void WriteLog(const Exception& e, const char* stringFunction, const char* stringFile, int nLine);
  21. };