From 2509e1248cd14eb83cc3c5f6bb247e370c080959 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 21 Jun 2021 20:20:30 +0100 Subject: [PATCH] vfio-user: correct logging levels If we're not a DEBUG build, vfu_setup_log() was effectively forcing a libvfio-user logging level of LOG_ERR. Instead, let the log handler decide what to report, so we can respect the SPDK levels. Signed-off-by: John Levon Change-Id: Ib3ad62589f495a377885f7deabaf02b428e83d30 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8452 Tested-by: SPDK CI Jenkins Reviewed-by: Thanos Makatos Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- lib/nvmf/vfio_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index e8f4dfe84..fb8f47d23 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -1757,8 +1757,7 @@ nvmf_vfio_user_listen(struct spdk_nvmf_transport *transport, err = -1; goto out; } - vfu_setup_log(endpoint->vfu_ctx, vfio_user_log, - SPDK_DEBUGLOG_FLAG_ENABLED("nvmf_vfio") ? LOG_DEBUG : LOG_ERR); + vfu_setup_log(endpoint->vfu_ctx, vfio_user_log, LOG_DEBUG); err = vfio_user_dev_info_fill(vu_transport, endpoint); if (err < 0) {