Print errors that happen early during startup

This commit is contained in:
Robbert van der Helm
2020-05-05 23:23:37 +02:00
parent 8049385e29
commit 750130e4a5
2 changed files with 13 additions and 5 deletions
+6
View File
@@ -15,6 +15,12 @@ Versioning](https://semver.org/spec/v2.0.0.html).
that's installed for a plugin in another directory. This is not recommended
though. Fixes #3.
### Fixed
- Redirect the output from the Wine host process earlier in the startup.
Otherwise errors printed startup won't be visible, making it very hard to
diagnose problems.
## [1.0.0] - 2020-05-03
### Added
+7 -5
View File
@@ -217,6 +217,13 @@ HostBridge::HostBridge(audioMasterCallback host_callback)
#endif
logger.log("");
// Print the Wine host's STDOUT and STDERR streams to the log file. This
// should be done before trying to accept the sockets as otherwise we will
// miss all output.
async_log_pipe_lines(wine_stdout, wine_stdout_buffer, "[Wine STDOUT] ");
async_log_pipe_lines(wine_stderr, wine_stderr_buffer, "[Wine STDERR] ");
wine_io_handler = std::thread([&]() { io_context.run(); });
// It's very important that these sockets are connected to in the same
// order in the Wine VST host
socket_acceptor.accept(host_vst_dispatch);
@@ -256,11 +263,6 @@ HostBridge::HostBridge(audioMasterCallback host_callback)
}
});
// Print the Wine host's STDOUT and STDERR streams to the log file
async_log_pipe_lines(wine_stdout, wine_stdout_buffer, "[Wine STDOUT] ");
async_log_pipe_lines(wine_stderr, wine_stderr_buffer, "[Wine STDERR] ");
wine_io_handler = std::thread([&]() { io_context.run(); });
// Read the plugin's information from the Wine process. This can only be
// done after we started accepting host callbacks as the plugin might do
// this during initialization.