Print the matched config file section

To make it more obvious where settings are being set from.
This commit is contained in:
Robbert van der Helm
2021-02-14 13:41:16 +01:00
parent 546882a281
commit f07503b9b6
2 changed files with 11 additions and 3 deletions
+3
View File
@@ -92,6 +92,9 @@ TODO: Add an updated screenshot with some fancy VST3-only plugins to the readme
host are now periodically synchronized with those of the host's audio
threads.
- When using `yabridge.toml` config files, the matched section or glob pattern
is now also printed next to the path to the file to make it a bit easier to
see where settings are being set from.
- The architecture document has been updated for the VST3 support and it has
been rewritten to talk more about the more interesting bits of yabridge's
implementation.
+8 -3
View File
@@ -146,9 +146,14 @@ class PluginBridge {
// settings in use. Printing the matched glob pattern could also be
// useful but it'll be very noisy and it's likely going to be clear from
// the shown values anyways.
init_msg << "config from: '"
<< config.matched_file.value_or("<defaults>").string() << "'"
<< std::endl;
init_msg << "config from: '";
if (config.matched_file && config.matched_pattern) {
init_msg << config.matched_file->string() << ", section \""
<< *config.matched_pattern << "\"";
} else {
init_msg << "<defaults>";
}
init_msg << "'" << std::endl;
init_msg << "hosting mode: '";
if (config.group) {