From 53ff83c24e84cd0ed301d895bf78035469e6183e Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Mon, 22 Feb 2021 12:37:28 -0500 Subject: [PATCH] NVMf/vfio-user: don't use SPDK log levels where syslog(3) log levels should be used Signed-off-by: Thanos Makatos Change-Id: Ia198b509e396a4635af9f9133e6dc40fc34c4ac1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6522 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto --- lib/nvmf/vfio_user.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index 85cfe7c7c..4e6b1ea4a 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -1339,12 +1339,12 @@ vfio_user_log(vfu_ctx_t *vfu_ctx, int level, char const *msg) { struct nvmf_vfio_user_endpoint *endpoint = vfu_get_private(vfu_ctx); - if (level >= SPDK_LOG_DEBUG) { - SPDK_DEBUGLOG(nvmf_vfio, "%s: %s", endpoint_id(endpoint), msg); - } else if (level >= SPDK_LOG_NOTICE) { - SPDK_NOTICELOG("%s: %s", endpoint_id(endpoint), msg); + if (level >= LOG_DEBUG) { + SPDK_DEBUGLOG(nvmf_vfio, "%s: %s\n", endpoint_id(endpoint), msg); + } else if (level >= LOG_NOTICE) { + SPDK_NOTICELOG("%s: %s\n", endpoint_id(endpoint), msg); } else { - SPDK_ERRLOG("%s: %s", endpoint_id(endpoint), msg); + SPDK_ERRLOG("%s: %s\n", endpoint_id(endpoint), msg); } } @@ -1620,7 +1620,7 @@ nvmf_vfio_user_listen(struct spdk_nvmf_transport *transport, goto out; } vfu_setup_log(endpoint->vfu_ctx, vfio_user_log, - SPDK_DEBUGLOG_FLAG_ENABLED("nvmf_vfio") ? SPDK_LOG_DEBUG : SPDK_LOG_ERROR); + SPDK_DEBUGLOG_FLAG_ENABLED("nvmf_vfio") ? LOG_DEBUG : LOG_ERR); err = vfio_user_dev_info_fill(endpoint); if (err < 0) {