Add logging for the VST3 plugin

This commit is contained in:
Robbert van der Helm
2020-12-04 19:40:13 +01:00
parent 426231a22b
commit d87afa99e0
3 changed files with 57 additions and 23 deletions
+24
View File
@@ -16,4 +16,28 @@
#include "vst3.h"
#include <sstream>
// TODO: Reconsider the output format
// TODO: Maybe think of an alterantive that's a little less boilerplaty
Vst3Logger::Vst3Logger(Logger& generic_logger) : logger(generic_logger) {}
void Vst3Logger::log_request(bool is_host_vst, const WantsConfiguration&) {
if (BOOST_UNLIKELY(logger.verbosity >= Logger::Verbosity::most_events)) {
std::ostringstream message;
message << get_log_prefix(is_host_vst)
<< " >> Requesting <Configuration>";
log(message.str());
}
}
void Vst3Logger::log_response(bool is_host_vst, const Configuration&) {
if (BOOST_UNLIKELY(logger.verbosity >= Logger::Verbosity::most_events)) {
std::ostringstream message;
message << get_log_prefix(is_host_vst) << " <Configuration>";
log(message.str());
}
}