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/http/http_client.hpp b/http/http_client.hpp
index 71fb885..e1c4d37 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -766,7 +766,7 @@
}
else if (requestQueue.size() < maxRequestQueueSize)
{
- BMCWEB_LOG_ERROR(
+ BMCWEB_LOG_DEBUG(
"Max pool size reached. Adding data to queue.{}:{}", destIP,
std::to_string(destPort));
requestQueue.emplace_back(std::move(thisReq), std::move(cb));
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 59a4eb9..0cdf081 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -165,7 +165,10 @@
auto parsed = boost::urls::parse_relative_ref(strValue);
if (!parsed)
{
- BMCWEB_LOG_CRITICAL("Couldn't parse URI from resource {}", strValue);
+ // Note that DMTF URIs such as
+ // https://redfish.dmtf.org/registries/Base.1.15.0.json will fail this
+ // check and that's okay
+ BMCWEB_LOG_DEBUG("Couldn't parse URI from resource {}", strValue);
return;
}
@@ -244,7 +247,10 @@
std::string* strValue = item.get_ptr<std::string*>();
if (strValue == nullptr)
{
- BMCWEB_LOG_CRITICAL("Field wasn't a string????");
+ // Values for properties like "InvalidURI" and "ResourceMissingAtURI"
+ // from within the Base Registry are objects instead of strings and will
+ // fall into this check
+ BMCWEB_LOG_DEBUG("Field was not a string");
return;
}
addPrefixToStringItem(*strValue, prefix);
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 9f2748d..9a45404 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -564,7 +564,7 @@
const dbus::utility::MapperGetObject& resp) {
if (ec || resp.empty())
{
- BMCWEB_LOG_ERROR(
+ BMCWEB_LOG_WARNING(
"DBUS response error during getting of service name: {}", ec);
LDAPConfigData empty{};
callback(false, empty, ldapType);
@@ -581,7 +581,7 @@
if (ec2)
{
callback(false, confData, ldapType);
- BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec2);
+ BMCWEB_LOG_WARNING("D-Bus responses error: {}", ec2);
return;
}
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
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index a114d44..c51a586 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -326,7 +326,7 @@
{
configRoot["Profile"] = currentProfile;
}
- BMCWEB_LOG_ERROR("profile = {} !", currentProfile);
+ BMCWEB_LOG_DEBUG("profile = {} !", currentProfile);
for (const auto& pathPair : managedObj)
{
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index af2725a..b538806 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -888,7 +888,7 @@
}
else
{
- BMCWEB_LOG_ERROR("Unknown software purpose {}", purpose);
+ BMCWEB_LOG_DEBUG("Unknown software purpose {}", purpose);
}
}