diff options
Diffstat (limited to 'redfish-core/src/error_messages.cpp')
-rw-r--r-- | redfish-core/src/error_messages.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp index 85aab34530..38f10c824d 100644 --- a/redfish-core/src/error_messages.cpp +++ b/redfish-core/src/error_messages.cpp @@ -51,16 +51,15 @@ static void addMessageToErrorJson(nlohmann::json& target, auto messageIdIterator = message.find("MessageId"); if (messageIdIterator == message.end()) { - BMCWEB_LOG_CRITICAL - << "Attempt to add error message without MessageId"; + BMCWEB_LOG_CRITICAL( + "Attempt to add error message without MessageId"); return; } auto messageFieldIterator = message.find("Message"); if (messageFieldIterator == message.end()) { - BMCWEB_LOG_CRITICAL - << "Attempt to add error message without Message"; + BMCWEB_LOG_CRITICAL("Attempt to add error message without Message"); return; } error["code"] = *messageIdIterator; @@ -282,9 +281,9 @@ nlohmann::json internalError() void internalError(crow::Response& res, const std::source_location location) { - BMCWEB_LOG_CRITICAL << "Internal Error " << location.file_name() << "(" - << location.line() << ":" << location.column() << ") `" - << location.function_name() << "`: "; + BMCWEB_LOG_CRITICAL("Internal Error {}({}:{}) `{}`: ", location.file_name(), + location.line(), location.column(), + location.function_name()); res.result(boost::beast::http::status::internal_server_error); addMessageToErrorJson(res.jsonValue, internalError()); } |