Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot
more flexibility, and better compile times when doing logging.
Unfortunately, given its level of compile time checks, it needs to be a
method, instead of the stream style logging we had before. This
requires a pretty substantial change. Fortunately, this change can be
largely automated, via the script included in this commit under
scripts/replace_logs.py. This is to aid people in moving their
patchsets over to the new form in the short period where old patches
will be based on the old logging. The intention is that this script
eventually goes away.
The old style logging (stream based) looked like.
BMCWEB_LOG_DEBUG << "Foo " << foo;
The new equivalent of the above would be:
BMCWEB_LOG_DEBUG("Foo {}", foo);
In the course of doing this, this also cleans up several ignored linter
errors, including macro usage, and array to pointer deconstruction.
Note, This patchset does remove the timestamp from the log message. In
practice, this was duplicated between journald and bmcweb, and there's
no need for both to exist.
One design decision of note is the addition of logPtr. Because the
compiler can't disambiguate between const char* and const MyThing*, it's
necessary to add an explicit cast to void*. This is identical to how
fmt handled it.
Tested: compiled with logging meson_option enabled, and launched bmcweb
Saw the usual logging, similar to what was present before:
```
[Error include/webassets.hpp:60] Unable to find or open /usr/share/www/ static file hosting disabled
[Debug include/persistent_data.hpp:133] Restored Session Timeout: 1800
[Debug redfish-core/include/event_service_manager.hpp:671] Old eventService config not exist
[Info src/webserver_main.cpp:59] Starting webserver on port 18080
[Error redfish-core/include/event_service_manager.hpp:1301] inotify_add_watch failed for redfish log file.
[Info src/webserver_main.cpp:137] Start Hostname Monitor Service...
```
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I86a46aa2454be7fe80df608cb7e5573ca4029ec8
diff --git a/redfish-core/include/utils/chassis_utils.hpp b/redfish-core/include/utils/chassis_utils.hpp
index 9c7c7db..c8c203d 100644
--- a/redfish-core/include/utils/chassis_utils.hpp
+++ b/redfish-core/include/utils/chassis_utils.hpp
@@ -21,7 +21,7 @@
void getValidChassisPath(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& chassisId, Callback&& callback)
{
- BMCWEB_LOG_DEBUG << "checkChassisId enter";
+ BMCWEB_LOG_DEBUG("checkChassisId enter");
constexpr std::array<std::string_view, 2> interfaces = {
"xyz.openbmc_project.Inventory.Item.Board",
"xyz.openbmc_project.Inventory.Item.Chassis"};
@@ -33,11 +33,11 @@
chassisId](const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreePathsResponse&
chassisPaths) mutable {
- BMCWEB_LOG_DEBUG << "getValidChassisPath respHandler enter";
+ BMCWEB_LOG_DEBUG("getValidChassisPath respHandler enter");
if (ec)
{
- BMCWEB_LOG_ERROR << "getValidChassisPath respHandler DBUS error: "
- << ec;
+ BMCWEB_LOG_ERROR("getValidChassisPath respHandler DBUS error: {}",
+ ec);
messages::internalError(asyncResp->res);
return;
}
@@ -49,7 +49,7 @@
std::string chassisName = path.filename();
if (chassisName.empty())
{
- BMCWEB_LOG_ERROR << "Failed to find '/' in " << chassis;
+ BMCWEB_LOG_ERROR("Failed to find '/' in {}", chassis);
continue;
}
if (chassisName == chassisId)
@@ -60,7 +60,7 @@
}
callback(chassisPath);
});
- BMCWEB_LOG_DEBUG << "checkChassisId exit";
+ BMCWEB_LOG_DEBUG("checkChassisId exit");
}
} // namespace chassis_utils
diff --git a/redfish-core/include/utils/collection.hpp b/redfish-core/include/utils/collection.hpp
index 500749c..862be90 100644
--- a/redfish-core/include/utils/collection.hpp
+++ b/redfish-core/include/utils/collection.hpp
@@ -37,8 +37,7 @@
std::span<const std::string_view> interfaces,
const char* subtree = "/xyz/openbmc_project/inventory")
{
- BMCWEB_LOG_DEBUG << "Get collection members for: "
- << collectionPath.buffer();
+ BMCWEB_LOG_DEBUG("Get collection members for: {}", collectionPath.buffer());
dbus::utility::getSubTreePaths(
subtree, 0, interfaces,
[collectionPath, asyncResp{std::move(asyncResp)}](
@@ -53,7 +52,7 @@
if (ec)
{
- BMCWEB_LOG_DEBUG << "DBUS response error " << ec.value();
+ BMCWEB_LOG_DEBUG("DBUS response error {}", ec.value());
messages::internalError(asyncResp->res);
return;
}
diff --git a/redfish-core/include/utils/dbus_utils.hpp b/redfish-core/include/utils/dbus_utils.hpp
index 7e895fe..298a56b 100644
--- a/redfish-core/include/utils/dbus_utils.hpp
+++ b/redfish-core/include/utils/dbus_utils.hpp
@@ -14,11 +14,10 @@
void operator()(const sdbusplus::UnpackErrorReason reason,
const std::string& property) const noexcept
{
- BMCWEB_LOG_ERROR
- << "DBUS property error in property: " << property << ", reason: "
- << static_cast<
- std::underlying_type_t<sdbusplus::UnpackErrorReason>>(
- reason);
+ BMCWEB_LOG_ERROR(
+ "DBUS property error in property: {}, reason: {}", property,
+ static_cast<std::underlying_type_t<sdbusplus::UnpackErrorReason>>(
+ reason));
}
};
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index 642ca80..3d3ae8d 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -101,21 +101,21 @@
{
if (from > std::numeric_limits<ToType>::max())
{
- BMCWEB_LOG_DEBUG << "Value for key " << key
- << " was greater than max: " << __PRETTY_FUNCTION__;
+ BMCWEB_LOG_DEBUG("Value for key {} was greater than max: {}", key,
+ __PRETTY_FUNCTION__);
return false;
}
if (from < std::numeric_limits<ToType>::lowest())
{
- BMCWEB_LOG_DEBUG << "Value for key " << key
- << " was less than min: " << __PRETTY_FUNCTION__;
+ BMCWEB_LOG_DEBUG("Value for key {} was less than min: {}", key,
+ __PRETTY_FUNCTION__);
return false;
}
if constexpr (std::is_floating_point_v<ToType>)
{
if (std::isnan(from))
{
- BMCWEB_LOG_DEBUG << "Value for key " << key << " was NAN";
+ BMCWEB_LOG_DEBUG("Value for key {} was NAN", key);
return false;
}
}
@@ -193,9 +193,8 @@
JsonType jsonPtr = jsonValue.get_ptr<JsonType>();
if (jsonPtr == nullptr)
{
- BMCWEB_LOG_DEBUG
- << "Value for key " << key
- << " was incorrect type: " << jsonValue.type_name();
+ BMCWEB_LOG_DEBUG("Value for key {} was incorrect type: {}", key,
+ jsonValue.type_name());
return UnpackErrorCode::invalidType;
}
value = std::move(*jsonPtr);
@@ -392,7 +391,7 @@
jsonRequest.get_ptr<nlohmann::json::object_t*>();
if (obj == nullptr)
{
- BMCWEB_LOG_DEBUG << "Json value is not an object";
+ BMCWEB_LOG_DEBUG("Json value is not an object");
messages::unrecognizedRequestBody(res);
return false;
}
@@ -521,14 +520,14 @@
nlohmann::json jsonRequest;
if (!json_util::processJsonFromRequest(res, req, jsonRequest))
{
- BMCWEB_LOG_DEBUG << "Json value not readable";
+ BMCWEB_LOG_DEBUG("Json value not readable");
return std::nullopt;
}
nlohmann::json::object_t* object =
jsonRequest.get_ptr<nlohmann::json::object_t*>();
if (object == nullptr || object->empty())
{
- BMCWEB_LOG_DEBUG << "Json value is empty";
+ BMCWEB_LOG_DEBUG("Json value is empty");
messages::emptyJSON(res);
return std::nullopt;
}
@@ -568,7 +567,7 @@
nlohmann::json jsonRequest;
if (!json_util::processJsonFromRequest(res, req, jsonRequest))
{
- BMCWEB_LOG_DEBUG << "Json value not readable";
+ BMCWEB_LOG_DEBUG("Json value not readable");
return false;
}
return readJson(jsonRequest, res, key, std::forward<UnpackTypes&&>(in)...);
diff --git a/redfish-core/include/utils/pcie_util.hpp b/redfish-core/include/utils/pcie_util.hpp
index 4db6e03..a889f93 100644
--- a/redfish-core/include/utils/pcie_util.hpp
+++ b/redfish-core/include/utils/pcie_util.hpp
@@ -46,8 +46,7 @@
pcieDevicePaths) {
if (ec)
{
- BMCWEB_LOG_DEBUG << "no PCIe device paths found ec: "
- << ec.message();
+ BMCWEB_LOG_DEBUG("no PCIe device paths found ec: {}", ec.message());
// Not an error, system just doesn't have PCIe info
return;
}
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index 4ba521b..696e323 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -462,7 +462,7 @@
inline bool processOnly(crow::App& app, crow::Response& res,
std::function<void(crow::Response&)>& completionHandler)
{
- BMCWEB_LOG_DEBUG << "Processing only query param";
+ BMCWEB_LOG_DEBUG("Processing only query param");
auto itMembers = res.jsonValue.find("Members");
if (itMembers == res.jsonValue.end())
{
@@ -473,8 +473,9 @@
auto itMemBegin = itMembers->begin();
if (itMemBegin == itMembers->end() || itMembers->size() != 1)
{
- BMCWEB_LOG_DEBUG << "Members contains " << itMembers->size()
- << " element, returning full collection.";
+ BMCWEB_LOG_DEBUG(
+ "Members contains {} element, returning full collection.",
+ itMembers->size());
completionHandler(res);
return false;
}
@@ -482,7 +483,7 @@
auto itUrl = itMemBegin->find("@odata.id");
if (itUrl == itMemBegin->end())
{
- BMCWEB_LOG_DEBUG << "No found odata.id";
+ BMCWEB_LOG_DEBUG("No found odata.id");
messages::internalError(res);
completionHandler(res);
return false;
@@ -490,7 +491,7 @@
const std::string* url = itUrl->get_ptr<const std::string*>();
if (url == nullptr)
{
- BMCWEB_LOG_DEBUG << "@odata.id wasn't a string????";
+ BMCWEB_LOG_DEBUG("@odata.id wasn't a string????");
messages::internalError(res);
completionHandler(res);
return false;
@@ -507,7 +508,8 @@
}
auto asyncResp = std::make_shared<bmcweb::AsyncResp>();
- BMCWEB_LOG_DEBUG << "setting completion handler on " << &asyncResp->res;
+ BMCWEB_LOG_DEBUG("setting completion handler on {}",
+ logPtr(&asyncResp->res));
asyncResp->res.setCompleteRequestHandler(std::move(completionHandler));
asyncResp->res.setIsAliveHelper(res.releaseIsAliveHelper());
app.handle(newReq, asyncResp);
@@ -579,7 +581,7 @@
for (auto& element : array)
{
nlohmann::json::json_pointer newPtr = jsonPtr / index;
- BMCWEB_LOG_DEBUG << "Traversing response at " << newPtr.to_string();
+ BMCWEB_LOG_DEBUG("Traversing response at {}", newPtr.to_string());
findNavigationReferencesRecursive(eType, element, newPtr, depth,
skipDepth, inLinks, out);
index++;
@@ -600,8 +602,7 @@
obj.begin()->second.get_ptr<const std::string*>();
if (uri != nullptr)
{
- BMCWEB_LOG_DEBUG << "Found " << *uri << " at "
- << jsonPtr.to_string();
+ BMCWEB_LOG_DEBUG("Found {} at {}", *uri, jsonPtr.to_string());
if (skipDepth == 0)
{
out.push_back({jsonPtr, *uri});
@@ -658,7 +659,7 @@
continue;
}
nlohmann::json::json_pointer newPtr = jsonPtr / element.first;
- BMCWEB_LOG_DEBUG << "Traversing response at " << newPtr;
+ BMCWEB_LOG_DEBUG("Traversing response at {}", newPtr);
findNavigationReferencesRecursive(eType, element.second, newPtr,
newDepth, skipDepth, localInLinks,
@@ -827,7 +828,7 @@
void placeResult(const nlohmann::json::json_pointer& locationToPlace,
crow::Response& res)
{
- BMCWEB_LOG_DEBUG << "placeResult for " << locationToPlace;
+ BMCWEB_LOG_DEBUG("placeResult for {}", locationToPlace);
propogateError(finalRes->res, res);
if (!res.jsonValue.is_object() || res.jsonValue.empty())
{
@@ -844,7 +845,7 @@
std::vector<ExpandNode> nodes = findNavigationReferences(
query.expandType, query.expandLevel, delegated.expandLevel,
finalRes->res.jsonValue);
- BMCWEB_LOG_DEBUG << nodes.size() << " nodes to traverse";
+ BMCWEB_LOG_DEBUG("{} nodes to traverse", nodes.size());
const std::optional<std::string> queryStr = formatQueryForExpand(query);
if (!queryStr)
{
@@ -854,7 +855,7 @@
for (const ExpandNode& node : nodes)
{
const std::string subQuery = node.uri + *queryStr;
- BMCWEB_LOG_DEBUG << "URL of subquery: " << subQuery;
+ BMCWEB_LOG_DEBUG("URL of subquery: {}", subQuery);
std::error_code ec;
crow::Request newReq({boost::beast::http::verb::get, subQuery, 11},
ec);
@@ -865,8 +866,8 @@
}
auto asyncResp = std::make_shared<bmcweb::AsyncResp>();
- BMCWEB_LOG_DEBUG << "setting completion handler on "
- << &asyncResp->res;
+ BMCWEB_LOG_DEBUG("setting completion handler on {}",
+ logPtr(&asyncResp->res));
addAwaitingResponse(asyncResp, node.location);
app.handle(newReq, asyncResp);
@@ -902,7 +903,7 @@
return;
}
- BMCWEB_LOG_DEBUG << "Handling top/skip";
+ BMCWEB_LOG_DEBUG("Handling top/skip");
nlohmann::json::object_t::iterator members = obj->find("Members");
if (members == obj->end())
{
@@ -946,12 +947,12 @@
currRoot.get_ptr<nlohmann::json::object_t*>();
if (object != nullptr)
{
- BMCWEB_LOG_DEBUG << "Current JSON is an object";
+ BMCWEB_LOG_DEBUG("Current JSON is an object");
auto it = currRoot.begin();
while (it != currRoot.end())
{
auto nextIt = std::next(it);
- BMCWEB_LOG_DEBUG << "key=" << it.key();
+ BMCWEB_LOG_DEBUG("key={}", it.key());
const SelectTrieNode* nextNode = currNode.find(it.key());
// Per the Redfish spec section 7.3.3, the service shall select
// certain properties as if $select was omitted. This applies to
@@ -969,12 +970,12 @@
}
if (nextNode != nullptr)
{
- BMCWEB_LOG_DEBUG << "Recursively select: " << it.key();
+ BMCWEB_LOG_DEBUG("Recursively select: {}", it.key());
recursiveSelect(*it, *nextNode);
it = nextIt;
continue;
}
- BMCWEB_LOG_DEBUG << it.key() << " is getting removed!";
+ BMCWEB_LOG_DEBUG("{} is getting removed!", it.key());
it = currRoot.erase(it);
}
}
@@ -982,7 +983,7 @@
currRoot.get_ptr<nlohmann::json::array_t*>();
if (array != nullptr)
{
- BMCWEB_LOG_DEBUG << "Current JSON is an array";
+ BMCWEB_LOG_DEBUG("Current JSON is an array");
// Array index is omitted, so reuse the same Trie node
for (nlohmann::json& nextRoot : *array)
{
@@ -1000,7 +1001,7 @@
inline void processSelect(crow::Response& intermediateResponse,
const SelectTrieNode& trieRoot)
{
- BMCWEB_LOG_DEBUG << "Process $select quary parameter";
+ BMCWEB_LOG_DEBUG("Process $select quary parameter");
recursiveSelect(intermediateResponse.jsonValue, trieRoot);
}
@@ -1011,11 +1012,11 @@
{
if (!completionHandler)
{
- BMCWEB_LOG_DEBUG << "Function was invalid?";
+ BMCWEB_LOG_DEBUG("Function was invalid?");
return;
}
- BMCWEB_LOG_DEBUG << "Processing query params";
+ BMCWEB_LOG_DEBUG("Processing query params");
// If the request failed, there's no reason to even try to run query
// params.
if (intermediateResponse.resultInt() < 200 ||
@@ -1037,7 +1038,7 @@
if (query.expandType != ExpandType::None)
{
- BMCWEB_LOG_DEBUG << "Executing expand query";
+ BMCWEB_LOG_DEBUG("Executing expand query");
auto asyncResp = std::make_shared<bmcweb::AsyncResp>(
std::move(intermediateResponse));
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index 176586f..cffc637 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -54,11 +54,11 @@
populateLinkToImages](
const boost::system::error_code& ec,
const dbus::utility::MapperEndPoints& functionalSw) {
- BMCWEB_LOG_DEBUG << "populateSoftwareInformation enter";
+ BMCWEB_LOG_DEBUG("populateSoftwareInformation enter");
if (ec)
{
- BMCWEB_LOG_ERROR << "error_code = " << ec;
- BMCWEB_LOG_ERROR << "error msg = " << ec.message();
+ BMCWEB_LOG_ERROR("error_code = {}", ec);
+ BMCWEB_LOG_ERROR("error msg = {}", ec.message());
messages::internalError(asyncResp->res);
return;
}
@@ -67,7 +67,7 @@
{
// Could keep going and try to populate SoftwareImages but
// something is seriously wrong, so just fail
- BMCWEB_LOG_ERROR << "Zero functional software in system";
+ BMCWEB_LOG_ERROR("Zero functional software in system");
messages::internalError(asyncResp->res);
return;
}
@@ -98,13 +98,13 @@
const dbus::utility::MapperGetSubTreeResponse& subtree) {
if (ec2)
{
- BMCWEB_LOG_ERROR << "error_code = " << ec2;
- BMCWEB_LOG_ERROR << "error msg = " << ec2.message();
+ BMCWEB_LOG_ERROR("error_code = {}", ec2);
+ BMCWEB_LOG_ERROR("error msg = {}", ec2.message());
messages::internalError(asyncResp->res);
return;
}
- BMCWEB_LOG_DEBUG << "Found " << subtree.size() << " images";
+ BMCWEB_LOG_DEBUG("Found {} images", subtree.size());
for (const std::pair<std::string,
std::vector<std::pair<
@@ -116,7 +116,7 @@
if (swId.empty())
{
messages::internalError(asyncResp->res);
- BMCWEB_LOG_ERROR << "Invalid software ID";
+ BMCWEB_LOG_ERROR("Invalid software ID");
return;
}
@@ -142,8 +142,8 @@
propertiesList) {
if (ec3)
{
- BMCWEB_LOG_ERROR << "error_code = " << ec3;
- BMCWEB_LOG_ERROR << "error msg = " << ec3.message();
+ BMCWEB_LOG_ERROR("error_code = {}", ec3);
+ BMCWEB_LOG_ERROR("error msg = {}", ec3.message());
// Have seen the code update app delete the D-Bus
// object, during code update, between the call to
// mapper and here. Just leave these properties off if
@@ -185,9 +185,9 @@
return;
}
- BMCWEB_LOG_DEBUG << "Image ID: " << swId;
- BMCWEB_LOG_DEBUG << "Running image: " << runningImage;
- BMCWEB_LOG_DEBUG << "Image purpose: " << *swInvPurpose;
+ BMCWEB_LOG_DEBUG("Image ID: {}", swId);
+ BMCWEB_LOG_DEBUG("Running image: {}", runningImage);
+ BMCWEB_LOG_DEBUG("Image purpose: {}", *swInvPurpose);
if (populateLinkToImages)
{
@@ -253,7 +253,7 @@
{
return resource::State::StandbySpare;
}
- BMCWEB_LOG_DEBUG << "Default sw state " << swState << " to Disabled";
+ BMCWEB_LOG_DEBUG("Default sw state {} to Disabled", swState);
return resource::State::Disabled;
}
@@ -277,7 +277,7 @@
{
return "OK";
}
- BMCWEB_LOG_DEBUG << "Sw state " << swState << " to Warning";
+ BMCWEB_LOG_DEBUG("Sw state {} to Warning", swState);
return "Warning";
}
@@ -297,7 +297,7 @@
const std::shared_ptr<std::string>& swId,
const std::string& dbusSvc)
{
- BMCWEB_LOG_DEBUG << "getSwStatus: swId " << *swId << " svc " << dbusSvc;
+ BMCWEB_LOG_DEBUG("getSwStatus: swId {} svc {}", *swId, dbusSvc);
sdbusplus::asio::getAllProperties(
*crow::connections::systemBus, dbusSvc,
@@ -331,7 +331,7 @@
return;
}
- BMCWEB_LOG_DEBUG << "getSwStatus: Activation " << *swInvActivation;
+ BMCWEB_LOG_DEBUG("getSwStatus: Activation {}", *swInvActivation);
asyncResp->res.jsonValue["Status"]["State"] =
getRedfishSwState(*swInvActivation);
asyncResp->res.jsonValue["Status"]["Health"] =
@@ -359,8 +359,8 @@
const dbus::utility::MapperEndPoints& objPaths) {
if (ec)
{
- BMCWEB_LOG_DEBUG << " error_code = " << ec
- << " error msg = " << ec.message();
+ BMCWEB_LOG_DEBUG(" error_code = {} error msg = {}", ec,
+ ec.message());
// System can exist with no updateable software,
// so don't throw error here.
return;
diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
index 58ab1c9..33e31f0 100644
--- a/redfish-core/include/utils/telemetry_utils.hpp
+++ b/redfish-core/include/utils/telemetry_utils.hpp
@@ -71,9 +71,9 @@
if (!parsed)
{
- BMCWEB_LOG_ERROR << "Failed to get chassis and sensor Node "
- "from "
- << uri;
+ BMCWEB_LOG_ERROR("Failed to get chassis and sensor Node "
+ "from {}",
+ uri);
return std::make_optional<IncorrectMetricUri>({uri, uriIdx});
}
@@ -101,9 +101,9 @@
continue;
}
- BMCWEB_LOG_ERROR << "Failed to get chassis and sensor Node "
- "from "
- << uri;
+ BMCWEB_LOG_ERROR("Failed to get chassis and sensor Node "
+ "from {}",
+ uri);
return std::make_optional<IncorrectMetricUri>({uri, uriIdx});
}
return std::nullopt;
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index 17c9111..314ea85 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -93,14 +93,13 @@
auto [ptr, ec] = std::from_chars(v.begin(), v.end(), ticks);
if (ec != std::errc())
{
- BMCWEB_LOG_ERROR << "Failed to convert string \"" << v
- << "\" to decimal";
+ BMCWEB_LOG_ERROR("Failed to convert string \"{}\" to decimal", v);
return std::nullopt;
}
size_t charactersRead = static_cast<size_t>(ptr - v.data());
if (ptr >= v.end())
{
- BMCWEB_LOG_ERROR << "Missing postfix";
+ BMCWEB_LOG_ERROR("Missing postfix");
return std::nullopt;
}
if (*ptr == 'D')
@@ -147,8 +146,7 @@
}
else if (stage > ProcessingStage::Milliseconds)
{
- BMCWEB_LOG_ERROR
- << "Got unexpected information at end of parse";
+ BMCWEB_LOG_ERROR("Got unexpected information at end of parse");
return std::nullopt;
}
else
@@ -170,7 +168,7 @@
}
else
{
- BMCWEB_LOG_ERROR << "Unknown postfix " << *ptr;
+ BMCWEB_LOG_ERROR("Unknown postfix {}", *ptr);
return std::nullopt;
}