dbuf: use log topic

This commit is contained in:
Wim Taymans 2021-10-03 12:27:20 +02:00
parent 783ae4d4e9
commit 392b2f1f96

View file

@ -40,7 +40,9 @@
#include <spa/support/plugin.h>
#include <spa/support/dbus.h>
#define NAME "dbus"
static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.dbus");
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &log_topic
struct impl {
struct spa_handle handle;
@ -524,6 +526,8 @@ impl_init(const struct spa_handle_factory *factory,
&impl_dbus, this);
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
spa_log_topic_init(this->log, &log_topic);
this->utils = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_LoopUtils);
if (this->utils == NULL) {
@ -531,7 +535,7 @@ impl_init(const struct spa_handle_factory *factory,
return -EINVAL;
}
spa_log_debug(this->log, NAME " %p: initialized", this);
spa_log_debug(this->log, "%p: initialized", this);
return 0;
}