From 8cc8edec45fb504457933c2c3f2625fa876493e6 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 28 Feb 2022 10:20:59 -0800 Subject: Don't rely on operator << for object logging In the upcoming fmt patch, we remove the use of streams, and a number of our logging statements are relying on them. This commit changes them to no longer rely on operator>> or operator+ to build their strings. This alone isn't very useful, but in the context of the next patch makes the automation able to do a complete conversion of all log statements automatically. Tested: enabled logging on local and saw log statements print to console Signed-off-by: Ed Tanous Change-Id: I0e5dc2cf015c6924037e38d547535eda8175a6a1 --- include/ibm/management_console_rest.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/ibm') diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp index a9e0ec4540..8e307464ca 100644 --- a/include/ibm/management_console_rest.hpp +++ b/include/ibm/management_console_rest.hpp @@ -136,7 +136,7 @@ inline void handleFilePut(const crow::Request& req, // Form the file path loc /= fileID; - BMCWEB_LOG_DEBUG << "Writing to the file: " << loc; + BMCWEB_LOG_DEBUG << "Writing to the file: " << loc.string(); // Check if the same file exists in the directory bool fileExists = std::filesystem::exists(loc, ec); @@ -305,7 +305,7 @@ inline void handleFileGet(const std::shared_ptr& asyncResp, "/var/lib/bmcweb/ibm-management-console/configfiles/" + fileID); if (!std::filesystem::exists(loc)) { - BMCWEB_LOG_ERROR << loc << "Not found"; + BMCWEB_LOG_ERROR << loc.string() << "Not found"; asyncResp->res.result(boost::beast::http::status::not_found); asyncResp->res.jsonValue["Description"] = resourceNotFoundMsg; return; -- cgit v1.2.3