summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2019-08-01 14:26:15 -0700
committerEd Tanous <ed.tanous@intel.com>2019-08-08 22:49:24 +0000
commitb6a61a5ec6aa3509c7dccad521e3850c71008a7a (patch)
tree0e9d47dfba5b4d3dfd59e447d214350d27582560
parentaf07e3f5f3da3d30d17d79904ad185167e7a6821 (diff)
downloadbmcweb-b6a61a5ec6aa3509c7dccad521e3850c71008a7a.tar.gz
bmcweb-b6a61a5ec6aa3509c7dccad521e3850c71008a7a.zip
Don't return a 500 error for entries without priority metadata
This change makes an entry with no priority metadata default to "OK" instead of returning a 500 error. Tested: Logged an entry without priority and confirmed that getting the Entries returns 200. Passed the Redfish Service Validator. Change-Id: I5a4633ef8542da6eaacad28953e5c99d992576fa Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
-rw-r--r--redfish-core/lib/log_services.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 578e673..9fd35a9 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1254,7 +1254,6 @@ static int fillBMCJournalLogEntryJson(const std::string &bmcJournalLogEntryID,
if (ret < 0)
{
BMCWEB_LOG_ERROR << "Failed to read PRIORITY field: " << strerror(-ret);
- return 1;
}
// Get the Created time from the timestamp
@@ -1275,8 +1274,7 @@ static int fillBMCJournalLogEntryJson(const std::string &bmcJournalLogEntryID,
{"Message", msg},
{"EntryType", "Oem"},
{"Severity",
- severity <= 2 ? "Critical"
- : severity <= 4 ? "Warning" : severity <= 7 ? "OK" : ""},
+ severity <= 2 ? "Critical" : severity <= 4 ? "Warning" : "OK"},
{"OemRecordFormat", "BMC Journal Entry"},
{"Created", std::move(entryTimeStr)}};
return 0;
OpenPOWER on IntegriCloud