Move logging level to WARNING for 404
These are 4xx errors, 404 not found. Move the logging to WARNING so they
don't log unless WARNING level is enabled. This follows the guidance in
the commit below.
Tested: None.
Change-Id: I38b2bec64507d75286f79d61acf7a96226598e0b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index 6e4e7bb..c56b390 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -308,7 +308,7 @@
"/var/lib/bmcweb/ibm-management-console/configfiles/" + fileID);
if (!std::filesystem::exists(loc) || !std::filesystem::is_regular_file(loc))
{
- BMCWEB_LOG_ERROR << loc.string() << " Not found";
+ BMCWEB_LOG_WARNING << loc.string() << " Not found";
asyncResp->res.result(boost::beast::http::status::not_found);
asyncResp->res.jsonValue["Description"] = resourceNotFoundMsg;
return;
@@ -317,7 +317,7 @@
std::ifstream readfile(loc.string());
if (!readfile)
{
- BMCWEB_LOG_ERROR << loc.string() << " Not found";
+ BMCWEB_LOG_WARNING << loc.string() << " Not found";
asyncResp->res.result(boost::beast::http::status::not_found);
asyncResp->res.jsonValue["Description"] = resourceNotFoundMsg;
return;
@@ -358,7 +358,7 @@
}
else
{
- BMCWEB_LOG_ERROR << "File not found!\n";
+ BMCWEB_LOG_WARNING << "File not found!\n";
asyncResp->res.result(boost::beast::http::status::not_found);
asyncResp->res.jsonValue["Description"] = resourceNotFoundMsg;
}