mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 04:19:10 -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"; }
|
||||
|
||||
void stream_logger::write_nolock(std::string_view output) {
|
||||
// TODO
|
||||
os_ << output;
|
||||
if (&os_ == &std::cerr) {
|
||||
fmt::print(stderr, "{}", output);
|
||||
} else {
|
||||
os_ << output;
|
||||
}
|
||||
}
|
||||
|
||||
void stream_logger::write(level_type level, const std::string& output,
|
||||
|
Loading…
x
Reference in New Issue
Block a user