mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Add PrimitiveWrapper logging for CLAP
This commit is contained in:
+16
-13
@@ -69,19 +69,22 @@ class ClapLogger {
|
|||||||
|
|
||||||
void log_response(bool is_host_plugin, const Configuration&);
|
void log_response(bool is_host_plugin, const Configuration&);
|
||||||
|
|
||||||
// TODO: Universal response
|
template <typename T>
|
||||||
// template <typename T>
|
void log_response(bool is_host_plugin,
|
||||||
// void log_response(bool is_host_plugin,
|
const PrimitiveWrapper<T>& value,
|
||||||
// const PrimitiveWrapper<T>& value,
|
bool from_cache = false) {
|
||||||
// bool from_cache = false) {
|
log_response_base(is_host_plugin, [&](auto& message) {
|
||||||
// // For logging all primitive return values other than `tresult`
|
if constexpr (std::is_same_v<T, bool>) {
|
||||||
// log_response_base(is_host_plugin, [&](auto& message) {
|
message << (value ? "true" : "false");
|
||||||
// message << value;
|
} else {
|
||||||
// if (from_cache) {
|
message << value;
|
||||||
// message << " (from cache)";
|
}
|
||||||
// }
|
|
||||||
// });
|
if (from_cache) {
|
||||||
// }
|
message << " (from cache)";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Logger::log_trace
|
* @see Logger::log_trace
|
||||||
|
|||||||
Reference in New Issue
Block a user