mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add logging for the...logging extension
This commit is contained in:
@@ -611,6 +611,41 @@ bool ClapLogger::log_request(bool is_host_plugin,
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(bool is_host_plugin,
|
||||
const clap::ext::log::host::Log& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": clap_host_log::log(severity = ";
|
||||
switch (request.severity) {
|
||||
case CLAP_LOG_DEBUG:
|
||||
message << "CLAP_LOG_DEBUG";
|
||||
break;
|
||||
case CLAP_LOG_INFO:
|
||||
message << "CLAP_LOG_INFO";
|
||||
break;
|
||||
case CLAP_LOG_WARNING:
|
||||
message << "CLAP_LOG_WARNING";
|
||||
break;
|
||||
case CLAP_LOG_ERROR:
|
||||
message << "CLAP_LOG_ERROR";
|
||||
break;
|
||||
case CLAP_LOG_FATAL:
|
||||
message << "CLAP_LOG_FATAL";
|
||||
break;
|
||||
case CLAP_LOG_HOST_MISBEHAVING:
|
||||
message << "CLAP_LOG_HOST_MISBEHAVING";
|
||||
break;
|
||||
case CLAP_LOG_PLUGIN_MISBEHAVING:
|
||||
message << "CLAP_LOG_PLUGIN_MISBEHAVING";
|
||||
break;
|
||||
default:
|
||||
message << request.severity << " (unknown)";
|
||||
break;
|
||||
}
|
||||
message << ", message = \"" << request.msg << "\")";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(bool is_host_plugin,
|
||||
const clap::ext::tail::host::Changed& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
|
||||
@@ -169,6 +169,7 @@ class ClapLogger {
|
||||
const clap::ext::state::host::MarkDirty&);
|
||||
|
||||
// Audio thread callbacks
|
||||
bool log_request(bool is_host_plugin, const clap::ext::log::host::Log&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::tail::host::Changed&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user