Append to the STDERR stream

This got lost when changing from using `std::cerr` to opening
`/dev/stderr` directly.
This commit is contained in:
Robbert van der Helm
2021-06-26 12:42:53 +02:00
parent 51ba93e4ed
commit e7366006df
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -77,7 +77,8 @@ Logger Logger::create_from_environment(std::string prefix) {
// the only way to do this is by reopening the STDERR and STDOUT streams
// to a pipe. Luckily `/dev/stderr` stays unaffected, so we can still
// write there without causing infinite loops.
return Logger(std::make_shared<std::ofstream>("/dev/stderr"),
return Logger(std::make_shared<std::ofstream>(
"/dev/stderr", std::fstream::out | std::fstream::app),
verbosity_level, prefix);
}
}