mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add a special exception logger
We'll need this to make sure that we can redirect caught exceptions printed in `src/common/` to the correct file if `YABRIDGE_DEBUG_FILE` is set.
This commit is contained in:
@@ -116,6 +116,14 @@ Logger Logger::create_wine_stderr() {
|
||||
"", std::shared_ptr<std::ostream>(&std::cerr, [](auto*) {}), false);
|
||||
}
|
||||
|
||||
Logger Logger::create_exception_logger() {
|
||||
#ifdef __WINE__
|
||||
return Logger::create_wine_stderr();
|
||||
#else
|
||||
return Logger::create_from_environment("[error] ");
|
||||
#endif
|
||||
}
|
||||
|
||||
void Logger::log(const std::string& message) {
|
||||
std::ostringstream formatted_message;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user