diff options
| author | Gunnar Mills <gmills@us.ibm.com> | 2023-02-22 22:23:23 +0300 |
|---|---|---|
| committer | Gunnar Mills <gmills@us.ibm.com> | 2023-03-09 05:22:38 +0300 |
| commit | a7405d5fe77fa9e324c22cb29ea08029fc023f4e (patch) | |
| tree | a5127a109f61dafb3c08c0957bdf7b38b9f351d6 | |
| parent | 0e88cb374b42224753e78ea1a98b349511fbb9e6 (diff) | |
| download | bmcweb-a7405d5fe77fa9e324c22cb29ea08029fc023f4e.tar.xz | |
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>
| -rw-r--r-- | include/ibm/management_console_rest.hpp | 6 | ||||
| -rw-r--r-- | redfish-core/lib/log_services.hpp | 4 | ||||
| -rw-r--r-- | redfish-core/lib/power.hpp | 4 | ||||
| -rw-r--r-- | redfish-core/lib/thermal_subsystem.hpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp index 6e4e7bbbfc..c56b3909c1 100644 --- a/include/ibm/management_console_rest.hpp +++ b/include/ibm/management_console_rest.hpp @@ -308,7 +308,7 @@ inline void handleFileGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, "/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 @@ inline void handleFileGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, 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 @@ inline void } 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; } diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp index f2a57223cf..1a9166bcb7 100644 --- a/redfish-core/lib/log_services.hpp +++ b/redfish-core/lib/log_services.hpp @@ -4048,7 +4048,7 @@ inline void requestRoutesPostCodesEntryAdditionalData(App& app) 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 @@ inline void requestRoutesPostCodesEntryAdditionalData(App& app) 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 7dbf6603bb..5d7bbb7d2d 100644 --- a/redfish-core/lib/power.hpp +++ b/redfish-core/lib/power.hpp @@ -39,7 +39,7 @@ inline void setPowerCapOverride( 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 @@ inline void setPowerCapOverride( 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 d86e3c30db..271951ecb3 100644 --- a/redfish-core/lib/thermal_subsystem.hpp +++ b/redfish-core/lib/thermal_subsystem.hpp @@ -20,7 +20,7 @@ inline void doThermalSubsystemCollection( { 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; } |
