Add additional information for logging
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: Idbc2245a89866db1a0a039c106c5c40c71228493
diff --git a/oem/ibm/libpldmresponder/file_io_type_pel.cpp b/oem/ibm/libpldmresponder/file_io_type_pel.cpp
index 6ad5ee2..15d8281 100644
--- a/oem/ibm/libpldmresponder/file_io_type_pel.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_pel.cpp
@@ -271,8 +271,9 @@
}
catch (const std::exception& e)
{
- error("failed to make a d-bus call to PEL daemon, ERROR={ERR_EXCEP}",
- "ERR_EXCEP", e.what());
+ error(
+ "failed to make a d-bus call to PEL daemon, PEL_FILE_NAME={PEL_FILE_NAME), ERROR={ERR_EXCEP}",
+ "PEL_FILE_NAME", pelFileName, "ERR_EXCEP", e.what());
return PLDM_ERROR;
}
diff --git a/oem/ibm/libpldmresponder/inband_code_update.cpp b/oem/ibm/libpldmresponder/inband_code_update.cpp
index 1e87824..fa025bd 100644
--- a/oem/ibm/libpldmresponder/inband_code_update.cpp
+++ b/oem/ibm/libpldmresponder/inband_code_update.cpp
@@ -117,8 +117,11 @@
}
catch (const std::exception& e)
{
- error("Failed To set RequestedApplyTime property ERROR={ERR_EXCEP}",
- "ERR_EXCEP", e.what());
+ error(
+ "Failed To set RequestedApplyTime property, OBJ_PATH={OBJ_PATH}, INTERFACE={INTERFACE}, PROP_NAME={PROP_NAME}, ERROR={ERR_EXCEP}",
+ "OBJ_PATH", dbusMapping.objectPath, "INTERFACE",
+ dbusMapping.interface, "PROP_NAME", dbusMapping.propertyName,
+ "ERR_EXCEP", e.what());
rc = PLDM_ERROR;
}
return rc;
@@ -140,8 +143,11 @@
}
catch (const std::exception& e)
{
- error("Failed To set RequestedActivation property ERROR={ERR_EXCEP}",
- "ERR_EXCEP", e.what());
+ error(
+ "Failed To set RequestedActivation property, OBJ_PATH={OBJ_PATH}, INTERFACE={INTERFACE}, PROP_NAME={PROP_NAME}, ERROR={ERR_EXCEP}",
+ "OBJ_PATH", dbusMapping.objectPath, "INTERFACE",
+ dbusMapping.interface, "PROP_NAME", dbusMapping.propertyName,
+ "ERR_EXCEP", e.what());
rc = PLDM_ERROR;
}
return rc;
@@ -377,8 +383,10 @@
}
catch (const std::exception& e)
{
- error("Failed to delete image, ERROR={ERR_EXCEP}", "ERR_EXCEP",
- e.what());
+ error(
+ "Failed to delete image, OBJ_PATH={OBJ_PATH}, INTERFACE={INTERFACE}, ERROR={ERR_EXCEP}",
+ "OBJ_PATH", SW_OBJ_PATH, "INTERFACE", DELETE_INTF, "ERR_EXCEP",
+ e.what());
return;
}
}