mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
feat(logger): special case logging to cerr, mostly for Windows terminal
This commit is contained in:
parent
90c8fcba2a
commit
1e319bbf62
@ -116,8 +116,11 @@ void stream_logger::postamble(std::ostream&) {}
|
|||||||
std::string_view stream_logger::get_newline() const { return "\n"; }
|
std::string_view stream_logger::get_newline() const { return "\n"; }
|
||||||
|
|
||||||
void stream_logger::write_nolock(std::string_view output) {
|
void stream_logger::write_nolock(std::string_view output) {
|
||||||
// TODO
|
if (&os_ == &std::cerr) {
|
||||||
os_ << output;
|
fmt::print(stderr, "{}", output);
|
||||||
|
} else {
|
||||||
|
os_ << output;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void stream_logger::write(level_type level, const std::string& output,
|
void stream_logger::write(level_type level, const std::string& output,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user