aboutsummaryrefslogtreecommitdiff
path: root/src/win/debug_logger.hpp
blob: 53c4859b5d8f37502294b0600ca50e725e65d600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "cru/win/win_pre_config.hpp"

#include "cru/common/logger.hpp"

namespace cru::platform::win {

class WinDebugLoggerSource : public ::cru::log::ILogSource {
 public:
  WinDebugLoggerSource() = default;

  CRU_DELETE_COPY(WinDebugLoggerSource)
  CRU_DELETE_MOVE(WinDebugLoggerSource)

  ~WinDebugLoggerSource() = default;

  void Write(::cru::log::LogLevel level, const std::string_view& s) override {
    ::OutputDebugStringA(s.data());
  }
};
}  // namespace cru::platform::win