1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-18 22:54:15 +01:00

[util] Improve multi-line logging

This commit is contained in:
Philip Rebohle 2019-07-18 13:34:52 +02:00
parent f16ba4794b
commit f3943934a7
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -52,8 +52,14 @@ namespace dxvk {
= {{ "trace: ", "debug: ", "info: ", "warn: ", "err: " }};
const char* prefix = s_prefixes.at(static_cast<uint32_t>(level));
std::cerr << prefix << message << std::endl;
m_fileStream << prefix << message << std::endl;
std::stringstream stream(message);
std::string line;
while (std::getline(stream, line, '\n')) {
std::cerr << prefix << line << std::endl;
m_fileStream << prefix << line << std::endl;
}
}
}