From dc73a1d93a8eaaf10319e545c4825b5c7fab5906 Mon Sep 17 00:00:00 2001 From: Kamil Cudnik Date: Fri, 30 Oct 2020 21:25:25 +0100 Subject: [PATCH] [saiplayer] Fix log messages (#686) Put correct messages for GCC --- saiplayer/SaiPlayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/saiplayer/SaiPlayer.cpp b/saiplayer/SaiPlayer.cpp index 1798aadbce32..1e8b472094d0 100644 --- a/saiplayer/SaiPlayer.cpp +++ b/saiplayer/SaiPlayer.cpp @@ -43,7 +43,7 @@ using namespace std::placeholders; timer.inc(entries.size()); #define CALL_BULK_REMOVE_API_WITH_TIMER(entry) \ - SWSS_LOG_INFO("executing BULK remove ", entry,", count = %zu ", entries.size()); \ + SWSS_LOG_INFO("executing BULK remove " #entry ", count = %zu ", entries.size()); \ static PerformanceIntervalTimer timer("SaiPlayer::handle_bulk_entry::bulkRemove("#entry")"); \ timer.start(); \ status = m_sai->bulkRemove(object_count, entries.data(), \ @@ -52,7 +52,7 @@ using namespace std::placeholders; timer.inc(entries.size()); #define CALL_BULK_SET_API_WITH_TIMER(entry) \ - SWSS_LOG_INFO("executing BULK set ", entry,", count = %zu ", entries.size()); \ + SWSS_LOG_INFO("executing BULK set " #entry ", count = %zu ", entries.size()); \ static PerformanceIntervalTimer timer("SaiPlayer::handle_bulk_entry::bulkSet("#entry")"); \ timer.start(); \ status = m_sai->bulkSet(object_count, entries.data(), \ @@ -1824,7 +1824,7 @@ void SaiPlayer::processBulk( if (status != SAI_STATUS_SUCCESS) { - SWSS_LOG_ERROR("handle bulk executed with failure, status = %s", sai_serialize_status(status)); + SWSS_LOG_ERROR("handle bulk executed with failure, status = %s", sai_serialize_status(status).c_str()); } // even if API will fail, we will need to compare all statuses for each entry