From dfd76046874fcb13b44a14364f8b384be3689a49 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Mon, 22 Feb 2021 13:09:15 -0500 Subject: [PATCH] NVMf/vfio-user: handle LOG_INFO and LOG_WARNING log levels Signed-off-by: Thanos Makatos Change-Id: Ie5129fcda87c054605180d80bf038f4dce2d71c0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6523 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu --- lib/nvmf/vfio_user.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c index 4e6b1ea4a..76e66d544 100644 --- a/lib/nvmf/vfio_user.c +++ b/lib/nvmf/vfio_user.c @@ -1341,8 +1341,12 @@ vfio_user_log(vfu_ctx_t *vfu_ctx, int level, char const *msg) if (level >= LOG_DEBUG) { SPDK_DEBUGLOG(nvmf_vfio, "%s: %s\n", endpoint_id(endpoint), msg); + } else if (level >= LOG_INFO) { + SPDK_INFOLOG(nvmf_vfio, "%s: %s\n", endpoint_id(endpoint), msg); } else if (level >= LOG_NOTICE) { SPDK_NOTICELOG("%s: %s\n", endpoint_id(endpoint), msg); + } else if (level >= LOG_WARNING) { + SPDK_WARNLOG("%s: %s\n", endpoint_id(endpoint), msg); } else { SPDK_ERRLOG("%s: %s\n", endpoint_id(endpoint), msg); }