diff options
author | Ed Tanous <ed@tanous.net> | 2024-03-12 02:58:24 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-04-03 19:13:03 +0300 |
commit | 296579be4c16e570ba8dcc65e7fe992cdc03e2a3 (patch) | |
tree | dd2aeaae46b49e9919a05a4673659c4c3d6db239 /include | |
parent | 60e299bde06288ae01a1dace54039ad7646c3e85 (diff) | |
download | bmcweb-296579be4c16e570ba8dcc65e7fe992cdc03e2a3.tar.xz |
Call dump() less
nlohmann::json::dump() is not an easy function to get the call
parameters correct on. We should limit the places we use it.
Luckily, both logging and redfish::messages support printing
json values directly. Use them where appropriate.
Tested: Error logging and out of range calls only of heavily used
messages and logging calls. Inspection only.
Change-Id: I57521d8791dd95250c93e8e3b2d4a959740ac713
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/openbmc_dbus_rest.hpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp index dd1dac37d9..e1d66f56e9 100644 --- a/include/openbmc_dbus_rest.hpp +++ b/include/openbmc_dbus_rest.hpp @@ -597,10 +597,7 @@ inline int convertJsonToDbus(sd_bus_message* m, const std::string& argType, const nlohmann::json& inputJson) { int r = 0; - BMCWEB_LOG_DEBUG( - "Converting {} to type: {}", - inputJson.dump(2, ' ', true, nlohmann::json::error_handler_t::replace), - argType); + BMCWEB_LOG_DEBUG("Converting {} to type: {}", inputJson, argType); const std::vector<std::string> argTypes = dbusArgSplit(argType); // Assume a single object for now. |