Reduce some Error log severities
There are instances of ERROR logs that would work better as WARNING or
DEBUG since they do not actually result in bailing early and returning
an error response.
Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I1e7bca0bb38487b26a4642ab72ce475170bb53c6
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 9cb1fe0..e17169a 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -2079,7 +2079,7 @@
std::filesystem::directory_iterator logPath(hostLoggerFilePath, ec);
if (ec)
{
- BMCWEB_LOG_ERROR("{}", ec.message());
+ BMCWEB_LOG_WARNING("{}", ec.message());
return false;
}
for (const std::filesystem::directory_entry& it : logPath)
@@ -2229,7 +2229,7 @@
std::vector<std::filesystem::path> hostLoggerFiles;
if (!getHostLoggerFiles(hostLoggerFolderPath, hostLoggerFiles))
{
- BMCWEB_LOG_ERROR("fail to get host log file path");
+ BMCWEB_LOG_DEBUG("Failed to get host log file path");
return;
}
// If we weren't provided top and skip limits, use the defaults.
@@ -2315,7 +2315,7 @@
std::vector<std::filesystem::path> hostLoggerFiles;
if (!getHostLoggerFiles(hostLoggerFolderPath, hostLoggerFiles))
{
- BMCWEB_LOG_ERROR("fail to get host log file path");
+ BMCWEB_LOG_DEBUG("Failed to get host log file path");
return;
}
@@ -2470,7 +2470,7 @@
ret = getJournalMetadata(journal, "SYSLOG_IDENTIFIER", syslogID);
if (ret < 0)
{
- BMCWEB_LOG_ERROR("Failed to read SYSLOG_IDENTIFIER field: {}",
+ BMCWEB_LOG_DEBUG("Failed to read SYSLOG_IDENTIFIER field: {}",
strerror(-ret));
}
if (!syslogID.empty())
@@ -2492,7 +2492,7 @@
ret = getJournalMetadata(journal, "PRIORITY", 10, severity);
if (ret < 0)
{
- BMCWEB_LOG_ERROR("Failed to read PRIORITY field: {}", strerror(-ret));
+ BMCWEB_LOG_DEBUG("Failed to read PRIORITY field: {}", strerror(-ret));
}
// Get the Created time from the timestamp