src: remove bool debug
Follow-up commit to the lg2 conversion.
Patching is not needed to get debug logs with lg2.
Tested: Inspection only.
Change-Id: Ie44b2debc7f4dff3a431a15f53720ae2da044a68
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/ipmb/IpmbSensor.cpp b/src/ipmb/IpmbSensor.cpp
index a1f5db2..a6c4ac1 100644
--- a/src/ipmb/IpmbSensor.cpp
+++ b/src/ipmb/IpmbSensor.cpp
@@ -50,8 +50,6 @@
#include <variant>
#include <vector>
-constexpr const bool debug = false;
-
static constexpr double ipmbMaxReading = 0xFF;
static constexpr double ipmbMinReading = 0;
@@ -431,16 +429,14 @@
return;
}
const std::vector<uint8_t>& data = std::get<5>(response);
- if constexpr (debug)
+
+ std::ostringstream tempStream;
+ for (int d : data)
{
- std::ostringstream tempStream;
- for (int d : data)
- {
- tempStream << std::setfill('0') << std::setw(2) << std::hex << d
- << " ";
- }
- lg2::info("'{NAME}': '{DATA}'", "NAME", name, "DATA", tempStream.str());
+ tempStream << std::setfill('0') << std::setw(2) << std::hex << d << " ";
}
+ lg2::debug("'{NAME}': '{DATA}'", "NAME", name, "DATA", tempStream.str());
+
if (data.empty())
{
incrementError();