XDWLog.hpp 959 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include "SystemLog.hpp"
  3. //-----------------------------------------------------------------------------
  4. //
  5. //-----------------------------------------------------------------------------
  6. namespace ECOM
  7. {
  8. namespace Log
  9. {
  10. class AppLog_API _XDWLog : public CSystemLog
  11. {
  12. public:
  13. _XDWLog ();
  14. _XDWLog (LPCSTR msg);
  15. ~_XDWLog ();
  16. virtual void Flush (const DString & str) override;
  17. _XDWLog & NewLine ();
  18. _XDWLog & Brace (LPCSTR str)
  19. {
  20. m_Detail += '['; m_Detail += str; m_Detail += ']'; m_Detail += ' ';
  21. return *this;
  22. }
  23. _XDWLog & Brace (const DString & str)
  24. {
  25. m_Detail += '['; m_Detail += str; m_Detail += ']'; m_Detail += ' ';
  26. return *this;
  27. }
  28. _XDWLog & Brace (const WString & str)
  29. {
  30. m_Detail += '['; m_Detail += str.ToDString (); m_Detail += ']'; m_Detail += ' ';
  31. return *this;
  32. }
  33. _XDWLog & Brace (int i)
  34. {
  35. return Brace (DString::From (i));
  36. }
  37. };
  38. }
  39. };