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/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index f2a5722..1a9166b 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -4048,7 +4048,7 @@
size_t value = static_cast<size_t>(currentValue) - 1;
if (value == std::string::npos || postcodes.size() < currentValue)
{
- BMCWEB_LOG_ERROR << "Wrong currentValue value";
+ BMCWEB_LOG_WARNING << "Wrong currentValue value";
messages::resourceNotFound(asyncResp->res, "LogEntry",
postCodeID);
return;
@@ -4057,7 +4057,7 @@
const auto& [tID, c] = postcodes[value];
if (c.empty())
{
- BMCWEB_LOG_INFO << "No found post code data";
+ BMCWEB_LOG_WARNING << "No found post code data";
messages::resourceNotFound(asyncResp->res, "LogEntry",
postCodeID);
return;
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 7dbf660..5d7bbb7 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -39,7 +39,7 @@
const std::optional<std::string>& chassisPath) mutable {
if (!chassisPath)
{
- BMCWEB_LOG_ERROR << "Don't find valid chassis path ";
+ BMCWEB_LOG_WARNING << "Don't find valid chassis path ";
messages::resourceNotFound(sensorsAsyncResp->asyncResp->res,
"Chassis", sensorsAsyncResp->chassisId);
return;
@@ -47,7 +47,7 @@
if (powerControlCollections.size() != 1)
{
- BMCWEB_LOG_ERROR << "Don't support multiple hosts at present ";
+ BMCWEB_LOG_WARNING << "Don't support multiple hosts at present ";
messages::resourceNotFound(sensorsAsyncResp->asyncResp->res,
"Power", "PowerControl");
return;
diff --git a/redfish-core/lib/thermal_subsystem.hpp b/redfish-core/lib/thermal_subsystem.hpp
index d86e3c3..271951e 100644
--- a/redfish-core/lib/thermal_subsystem.hpp
+++ b/redfish-core/lib/thermal_subsystem.hpp
@@ -20,7 +20,7 @@
{
if (!validChassisPath)
{
- BMCWEB_LOG_ERROR << "Not a valid chassis ID" << chassisId;
+ BMCWEB_LOG_WARNING << "Not a valid chassis ID" << chassisId;
messages::resourceNotFound(asyncResp->res, "Chassis", chassisId);
return;
}