From 01df7671d5fdfb2293b43fcf3694bd2facdc32db Mon Sep 17 00:00:00 2001 From: Huang-Huang Bao Date: Mon, 15 Mar 2021 17:32:20 +0800 Subject: [PATCH] bluez5: avoid log spamming on debug log level, use log level 'warn' on hsphfpd or ofono registering fail instead of 'error' --- spa/plugins/bluez5/a2dp-sink.c | 6 +++--- spa/plugins/bluez5/backend-hsphfpd.c | 2 +- spa/plugins/bluez5/backend-ofono.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spa/plugins/bluez5/a2dp-sink.c b/spa/plugins/bluez5/a2dp-sink.c index 45cfe51b2..78365350b 100644 --- a/spa/plugins/bluez5/a2dp-sink.c +++ b/spa/plugins/bluez5/a2dp-sink.c @@ -374,10 +374,10 @@ static int get_transport_unused_size(struct impl *this) int res, value; res = ioctl(this->flush_source.fd, TIOCOUTQ, &value); if (res < 0) { - spa_log_debug(this->log, NAME " %p: ioctl fail: %m", this); + spa_log_error(this->log, NAME " %p: ioctl fail: %m", this); return -errno; } - spa_log_debug(this->log, NAME " %p: fd unused buffer size:%d/%d", this, value, this->fd_buffer_size); + spa_log_trace(this->log, NAME " %p: fd unused buffer size:%d/%d", this, value, this->fd_buffer_size); return value; } @@ -667,7 +667,7 @@ static void a2dp_on_timeout(struct spa_source *source) this->clock->delay = (delay_nsec * this->clock->rate.denom) / SPA_NSEC_PER_SEC; } - spa_log_debug(this->log, NAME" %p: timeout %"PRIu64" %"PRIu64"", this, + spa_log_trace(this->log, NAME" %p: timeout %"PRIu64" %"PRIu64"", this, now_time, now_time - prev_time); spa_log_trace(this->log, NAME " %p: %d", this, io->status); diff --git a/spa/plugins/bluez5/backend-hsphfpd.c b/spa/plugins/bluez5/backend-hsphfpd.c index b6532e9f0..4549168a1 100644 --- a/spa/plugins/bluez5/backend-hsphfpd.c +++ b/spa/plugins/bluez5/backend-hsphfpd.c @@ -1232,7 +1232,7 @@ int backend_hsphfpd_register(struct spa_bt_backend *backend) dbus_message_unref(m); if (r == NULL) { - spa_log_error(backend->log, NAME": Registering application %s failed", path); + spa_log_warn(backend->log, NAME": Registering application %s failed", path); dbus_error_free(&err); return -EIO; } diff --git a/spa/plugins/bluez5/backend-ofono.c b/spa/plugins/bluez5/backend-ofono.c index 71a6d9824..c3781261d 100644 --- a/spa/plugins/bluez5/backend-ofono.c +++ b/spa/plugins/bluez5/backend-ofono.c @@ -531,7 +531,7 @@ int backend_ofono_register(struct spa_bt_backend *backend) dbus_message_unref(m); if (r == NULL) { - spa_log_error(backend->log, NAME": Registering Profile %s failed", path); + spa_log_warn(backend->log, NAME": Registering Profile %s failed", path); dbus_error_free(&err); return -EIO; }