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
+3
View File
@@ -59,6 +59,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
- Fixed VST2 speaker arrangement configurations returned by the plugin not being - Fixed VST2 speaker arrangement configurations returned by the plugin not being
serialized correctly. No plugins seem to actually use these, so it should not serialized correctly. No plugins seem to actually use these, so it should not
have caused any issues. have caused any issues.
- Fixed yabridge's logging seeking STDERR to position 0 every time it writes a
log message. This would be noticeable when piping a DAW's STDERR stream to a
file when `YABRIDGE_DEBUG_LEVEL` wasn't set.
- When printing the Wine version during initialization, the Wine process used - When printing the Wine version during initialization, the Wine process used
for this is now run under the same environment as the Wine plugin host process for this is now run under the same environment as the Wine plugin host process
will be run under. This means that when using a custom `WINELOADER` script to will be run under. This means that when using a custom `WINELOADER` script to
+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 // 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 // to a pipe. Luckily `/dev/stderr` stays unaffected, so we can still
// write there without causing infinite loops. // 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); verbosity_level, prefix);
} }
} }