blob: ad29a3ceb8dbfbdaf87b2d318ffe09d0036b3d75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "cru/common/log/StdioLogTarget.h"
#include <iostream>
namespace cru::log {
StdioLogTarget::StdioLogTarget() {}
StdioLogTarget::~StdioLogTarget() {}
void StdioLogTarget::Write(log::LogLevel level, StringView s) {
#ifdef CRU_PLATFORM_WINDOWS
#else
std::string m = s.ToUtf8();
if (level == log::LogLevel::Error) {
std::cerr << m;
} else {
std::cout << m;
}
#endif
}
} // namespace cru::log
|