Refactor the verbose tracing in PLDM
1. Add verbose tracing in requester code
2. Change the prefix of verbose tracing to "Tx: " and "Rx: "
3. Remove explicit verbose tracing flag in libpldmresponder
4. Change the prefix of pldmtool verbose tracing to "pldmtool: Tx: "
and "pldmtool: Rx: "
Signed-off-by: Tom Joseph <rushtotom@gmail.com>
Change-Id: Ie2c6b323e32e0828ed5ecaeb3e61943a98a2f089
diff --git a/common/utils.hpp b/common/utils.hpp
index 5bc99cd..72170fb 100644
--- a/common/utils.hpp
+++ b/common/utils.hpp
@@ -29,6 +29,8 @@
namespace fs = std::filesystem;
using Json = nlohmann::json;
+constexpr bool Tx = true;
+constexpr bool Rx = false;
/** @struct CustomFD
*
@@ -344,12 +346,13 @@
/** @brief Print the buffer
*
- * @param[in] buffer - Buffer to print
- * @param[in] pldmVerbose -verbosity flag - true/false
+ * @param[in] isTx - True if the buffer is an outgoing PLDM message, false if
+ the buffer is an incoming PLDM message
+ * @param[in] buffer - Buffer to print
*
* @return - None
*/
-void printBuffer(const std::vector<uint8_t>& buffer, bool pldmVerbose);
+void printBuffer(bool isTx, const std::vector<uint8_t>& buffer);
/** @brief Convert the buffer to std::string
*