oem-ibm: Improving logs (lg2)
This commit corrects the severity level of logs and also formats the
message string, fixing the ill-defined message string of the logs as
mentioned in the anti-pattern document [1]. Additionally, based on the
requirement this commit adds more debug information to logs.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#ill-defined-data-structuring-in-lg2-message-strings
Change-Id: I24ca21de35d5a1a9b3cc64b28a149e4c213055f9
Signed-off-by: Riya Dixit <riyadixitagra@gmail.com>
diff --git a/oem/ibm/libpldmresponder/file_io.hpp b/oem/ibm/libpldmresponder/file_io.hpp
index 63cd51b..e455583 100644
--- a/oem/ibm/libpldmresponder/file_io.hpp
+++ b/oem/ibm/libpldmresponder/file_io.hpp
@@ -117,8 +117,7 @@
int file = open(path.string().c_str(), flags);
if (file == -1)
{
- error("File does not exist, path = {FILE_PATH}", "FILE_PATH",
- path.string());
+ error("File at path '{PATH}' does not exist", "PATH", path.string());
encode_rw_file_memory_resp(instanceId, command, PLDM_ERROR, 0,
responsePtr);
return response;