From 1f5bd43fe803e6482d2200745811b2efa79319f1 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 17 Dec 2020 14:28:02 +0100 Subject: [PATCH] Print CIDs in IPluginBase::initialize() --- src/common/logging/vst3.cpp | 8 ++++---- src/common/serialization/vst3/base.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/logging/vst3.cpp b/src/common/logging/vst3.cpp index 7e02385a..3f511c1b 100644 --- a/src/common/logging/vst3.cpp +++ b/src/common/logging/vst3.cpp @@ -34,14 +34,14 @@ void Vst3Logger::log_unknown_interface( } void Vst3Logger::log_request(bool is_host_vst, - const Vst3PluginProxy::Construct&) { + const Vst3PluginProxy::Construct& args) { log_request_base(is_host_vst, [&](auto& message) { - // TODO: Log the CID on verbosity level 2, and then also report all CIDs - // in the plugin factory // TODO: When adding the enum class for instantiating different types, // make sure to reflect those in the constructor and destructor // logging - message << "IPluginFactory::createComponent(cid = ..., _iid = " + message << "IPluginFactory::createComponent(cid = " + << format_uid(Steinberg::FUID::fromTUID(args.cid.data())) + << ", _iid = " "IComponent::iid, " "&obj)"; }); diff --git a/src/common/serialization/vst3/base.cpp b/src/common/serialization/vst3/base.cpp index a44c1719..ef810b0a 100644 --- a/src/common/serialization/vst3/base.cpp +++ b/src/common/serialization/vst3/base.cpp @@ -27,11 +27,11 @@ std::string format_uid(const Steinberg::FUID& uid) { uid.to4Int(l1, l2, l3, l4); std::ostringstream formatted_uid; - formatted_uid << std::hex << std::uppercase << "(0x" << std::setfill('0') + formatted_uid << std::hex << std::uppercase << "{0x" << std::setfill('0') << std::setw(8) << l1 << ", 0x" << std::setfill('0') << std::setw(8) << l2 << ", 0x" << std::setfill('0') << std::setw(8) << l3 << ", 0x" << std::setfill('0') - << std::setw(8) << l4 << ")"; + << std::setw(8) << l4 << "}"; return formatted_uid.str(); }