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 <john.levon@nutanix.com>
Change-Id: Ib3ad62589f495a377885f7deabaf02b428e83d30
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
John Levon 2021-06-21 20:20:30 +01:00 committed by Jim Harris
parent 227428c3a4
commit 2509e1248c

View File

@ -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) {