diff --git a/libpldmresponder/base.cpp b/libpldmresponder/base.cpp
index e0708a4..2eae049 100644
--- a/libpldmresponder/base.cpp
+++ b/libpldmresponder/base.cpp
@@ -8,8 +8,6 @@
 #include <libpldm/fru.h>
 #include <libpldm/platform.h>
 
-#include <phosphor-logging/lg2.hpp>
-
 #include <array>
 #include <cstring>
 #include <map>
@@ -21,8 +19,6 @@
 #include <libpldm/oem/ibm/host.h>
 #endif
 
-PHOSPHOR_LOG2_USING;
-
 namespace pldm
 {
 using Type = uint8_t;
diff --git a/libpldmresponder/bios.cpp b/libpldmresponder/bios.cpp
index 48a3f28..d97229d 100644
--- a/libpldmresponder/bios.cpp
+++ b/libpldmresponder/bios.cpp
@@ -133,7 +133,7 @@
     catch (const sdbusplus::exception_t& e)
     {
         error(
-            "Error getting time from Elapsed property at '{PATH}' on '{INTERFACE}': {ERROR}",
+            "Error getting time from Elapsed property at path '{PATH}' on interface '{INTERFACE}': {ERROR}",
             "PATH", bmcTimePath, "INTERFACE", timeInterface, "ERROR", e);
         return CmdHandler::ccOnlyResponse(request, PLDM_ERROR);
     }
@@ -187,9 +187,9 @@
     catch (const std::exception& e)
     {
         error(
-            "Error getting the time sync property, PATH={TIME_SYNC_PATH} INTERFACE={SYNC_INTERFACE} PROPERTY={SYNC_PROP} ERROR={ERR_EXCEP}",
+            "Failed to get the time sync property from path {TIME_SYNC_PATH}, interface '{SYNC_INTERFACE}' and property '{SYNC_PROPERTY}', error - '{ERROR}'",
             "TIME_SYNC_PATH", timeSyncPath, "SYNC_INTERFACE", timeSyncInterface,
-            "SYNC_PROP", timeSyncProperty, "ERR_EXCEP", e.what());
+            "SYNC_PROPERTY", timeSyncProperty, "ERROR", e);
     }
 
     constexpr auto setTimeInterface = "xyz.openbmc_project.Time.EpochTime";
@@ -217,9 +217,9 @@
     catch (const std::exception& e)
     {
         error(
-            "Error Setting time,PATH={SET_TIME_PATH} TIME INTERFACE={TIME_INTERFACE} ERROR={ERR_EXCEP}",
+            "Failed to set time at {SET_TIME_PATH}, interface '{TIME_INTERFACE}' and error - {ERROR}",
             "SET_TIME_PATH", setTimePath, "TIME_INTERFACE", setTimeInterface,
-            "ERR_EXCEP", e.what());
+            "ERROR", e);
         return ccOnlyResponse(request, PLDM_ERROR);
     }
 
diff --git a/libpldmresponder/bios_config.cpp b/libpldmresponder/bios_config.cpp
index c45cd3e..699e0d5 100644
--- a/libpldmresponder/bios_config.cpp
+++ b/libpldmresponder/bios_config.cpp
@@ -528,8 +528,8 @@
     }
     catch (const std::exception& e)
     {
-        error("failed to update BaseBIOSTable property, ERROR={ERR_EXCEP}",
-              "ERR_EXCEP", e.what());
+        error("Failed to update BaseBIOSTable property, error - {ERROR}",
+              "ERROR", e);
     }
 }
 
@@ -578,8 +578,8 @@
     // bios-settings-manager in sync
     catch (const std::exception& e)
     {
-        error("Failed to read BaseBIOSTable property, ERROR={ERR_EXCEP}",
-              "ERR_EXCEP", e.what());
+        error("Failed to read BaseBIOSTable property, error - {ERROR}", "ERROR",
+              e);
     }
 
     Table attrTable, attrValueTable;
@@ -604,8 +604,9 @@
         }
         catch (const std::exception& e)
         {
-            error("Error constructing table entry for '{ATTR}': {ERROR}",
-                  "ATTR", attr->name, "ERROR", e);
+            error(
+                "Failed to construct table entry for attribute '{ATTRIBUTE}', error - {ERROR}",
+                "ATTRIBUTE", attr->name, "ERROR", e);
         }
     }
 
@@ -688,15 +689,15 @@
                 catch (const std::exception& e)
                 {
                     error(
-                        "Failed to parse JSON config file(entry handler) : {JSON_PATH}, {ERR_EXCEP}",
-                        "JSON_PATH", filePath.c_str(), "ERR_EXCEP", e.what());
+                        "Failed to parse JSON config file at path '{PATH}', error - {ERROR}",
+                        "PATH", filePath.c_str(), "ERROR", e);
                 }
             }
         }
         catch (const std::exception& e)
         {
-            error("Failed to parse JSON config at '{PATH}': {ERROR}", "PATH",
-                  filePath.c_str(), "ERROR", e);
+            error("Failed to parse JSON config file '{PATH}', error - {ERROR}",
+                  "PATH", filePath.c_str(), "ERROR", e);
         }
     }
 }
@@ -726,8 +727,8 @@
     if (rc != PLDM_SUCCESS)
     {
         error(
-            "Failed to decode BIOS table possible values for attribute entry: {LIPBLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+            "Failed to decode BIOS table possible values for attribute entry, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to decode BIOS table possible values for attribute entry");
     }
@@ -778,8 +779,8 @@
                                                  stringTable);
                 auto chkBMC = isBMC ? "true" : "false";
                 info(
-                    "BIOS: {ATTR_NAME}, updated to value: {NEW_VAL}, by BMC: {CHK_BMC} ",
-                    "ATTR_NAME", attrName, "NEW_VAL", nwVal, "CHK_BMC", chkBMC);
+                    "BIOS attribute '{ATTRIBUTE}' updated to value '{VALUE}' by BMC '{CHECK_BMC}'",
+                    "ATTRIBUTE", attrName, "VALUE", nwVal, "CHECK_BMC", chkBMC);
             }
             break;
         }
@@ -790,8 +791,8 @@
                 table::attribute_value::decodeIntegerEntry(attrValueEntry);
             auto chkBMC = isBMC ? "true" : "false";
             info(
-                "BIOS: {ATTR_NAME}, updated to value: {UPDATED_VAL}, by BMC: {CHK_BMC}",
-                "ATTR_NAME", attrName, "UPDATED_VAL", value, "CHK_BMC", chkBMC);
+                "BIOS attribute '{ATTRIBUTE}' updated to value '{VALUE}' by BMC '{CHECK_BMC}'",
+                "ATTRIBUTE", attrName, "VALUE", value, "CHECK_BMC", chkBMC);
             break;
         }
         case PLDM_BIOS_STRING:
@@ -801,8 +802,8 @@
                 table::attribute_value::decodeStringEntry(attrValueEntry);
             auto chkBMC = isBMC ? "true" : "false";
             info(
-                "BIOS: {ATTR_NAME}, updated to value: {UPDATED_VAL}, by BMC: {CHK_BMC}",
-                "ATTR_NAME", attrName, "UPDATED_VAL", value, "CHK_BMC", chkBMC);
+                "BIOS attribute '{ATTRIBUTE}' updated to value '{VALUE}' by BMC '{CHECK_BMC}'",
+                "ATTRIBUTE", attrName, "VALUE", value, "CHECK_BMC", chkBMC);
             break;
         }
         default:
@@ -833,8 +834,9 @@
             }
             if (value[0] >= pvHdls.size())
             {
-                error("Enum: Illgeal index, Index = {ATTR_INDEX}", "ATTR_INDEX",
-                      (int)value[0]);
+                error(
+                    "Invalid index '{INDEX}' encountered for Enum type BIOS attribute",
+                    "INDEX", (int)value[0]);
                 return PLDM_ERROR_INVALID_DATA;
             }
             return PLDM_SUCCESS;
@@ -849,8 +851,10 @@
 
             if (value < lower || value > upper)
             {
-                error("Integer: out of bound, value = {ATTR_VALUE}",
-                      "ATTR_VALUE", value);
+                error(
+                    "Out of range index '{ATTRIBUTE_VALUE}' encountered for Integer type BIOS attribute for the lower bound '{LOWER}', the upper bound '{UPPER}' and the scalar value '{SCALAR}'.",
+                    "ATTRIBUTE_VALUE", value, "LOWER", lower, "UPPER", upper,
+                    "SCALAR", scalar);
                 return PLDM_ERROR_INVALID_DATA;
             }
             return PLDM_SUCCESS;
@@ -865,15 +869,15 @@
                 value.size() > stringConf.maxLength)
             {
                 error(
-                    "String: Length error, string = {ATTR_VALUE} length {LEN}",
-                    "ATTR_VALUE", value, "LEN", value.size());
+                    "Invalid length '{LENGTH}' encountered for string type BIOS attribute value '{ATTRIBUTE_VALUE}' when minimum string entry length '{MIN_LEN}' and maximum string entry length '{MAX_LEN}'",
+                    "ATTRIBUTE_VALUE", value, "LENGTH", value.size(), "MIN_LEN",
+                    stringConf.minLength, "MAX_LEN", stringConf.maxLength);
                 return PLDM_ERROR_INVALID_LENGTH;
             }
             return PLDM_SUCCESS;
         }
         default:
-            error("ReadOnly or Unspported type, type = {ATTR_TYPE}",
-                  "ATTR_TYPE", attrType);
+            error("ReadOnly or Unsupported type '{TYPE}'", "TYPE", attrType);
             return PLDM_ERROR;
     };
 }
@@ -937,7 +941,7 @@
     }
     catch (const std::exception& e)
     {
-        error("Set attribute value error: {ERR_EXCEP}", "ERR_EXCEP", e.what());
+        error("Set attribute value error - {ERROR}", "ERROR", e);
         return PLDM_ERROR;
     }
 
@@ -958,7 +962,7 @@
     }
     catch (const std::exception& e)
     {
-        error("Remove the tables error: {ERR_EXCEP}", "ERR_EXCEP", e.what());
+        error("Remove the tables error - {ERROR}", "ERROR", e);
     }
 }
 
@@ -990,15 +994,16 @@
     }
     catch (const std::invalid_argument& e)
     {
-        error("Missing handle for '{ATTR}': {ERROR}", "ATTR", attrName, "ERROR",
-              e);
+        error(
+            "Missing handle for attribute '{ATTRIBUTE}' in BIOS String Table, error - '{ERROR}'",
+            "ATTRIBUTE", attrName, "ERROR", e);
         return;
     }
 
     auto attrTable = getBIOSTable(PLDM_BIOS_ATTR_TABLE);
     if (!attrTable.has_value())
     {
-        error("Attribute table not present");
+        error("BIOS Attribute table not present");
         return;
     }
     const struct pldm_bios_attr_table_entry* tableEntry =
@@ -1006,8 +1011,8 @@
     if (tableEntry == nullptr)
     {
         error(
-            "Attribute not found in attribute table, name= {ATTR_NAME} name handle={ATTR_HANDLE}",
-            "ATTR_NAME", attrName.c_str(), "ATTR_HANDLE", attrNameHdl);
+            "Failed to find attribute {ATTRIBUTE} in BIOS Attribute table with attribute handle '{ATTR_HANDLE}'",
+            "ATTRIBUTE", attrName, "ATTR_HANDLE", attrNameHdl);
         return;
     }
 
@@ -1028,8 +1033,8 @@
     if (rc != PLDM_SUCCESS)
     {
         error(
-            "Could not update the attribute value table for attribute handle={ATTR_HANDLE} and type={ATTR_TYPE}",
-            "ATTR_HANDLE", attrHdl, "ATTR_TYPE", (uint32_t)attrType);
+            "Failed to update the attribute value table for attribute handle '{ATTR_HANDLE}' and  attribute type '{TYPE}'",
+            "ATTR_HANDLE", attrHdl, "TYPE", (uint32_t)attrType);
         return;
     }
     auto destTable = table::attribute_value::updateTable(
@@ -1042,8 +1047,9 @@
     rc = setAttrValue(newValue.data(), newValue.size(), true, false);
     if (rc != PLDM_SUCCESS)
     {
-        error("could not setAttrValue on base bios table and dbus, rc = {RC}",
-              "RC", rc);
+        error(
+            "Failed to setAttrValue on base bios table and dbus, response code '{RC}'",
+            "RC", rc);
     }
 }
 
@@ -1087,8 +1093,7 @@
 
         if (iter == biosAttributes.end())
         {
-            error("Wrong attribute name, attributeName = {ATTR_NAME}",
-                  "ATTR_NAME", attributeName);
+            error("Wrong attribute name {NAME}", "NAME", attributeName);
             continue;
         }
 
@@ -1104,8 +1109,8 @@
             type != BIOSConfigManager::AttributeType::String &&
             type != BIOSConfigManager::AttributeType::Integer)
         {
-            error("Attribute type not supported, attributeType = {ATTR_TYPE}",
-                  "ATTR_TYPE", attributeType);
+            error("Attribute type '{TYPE}' not supported", "TYPE",
+                  attributeType);
             continue;
         }
 
diff --git a/libpldmresponder/bios_config.hpp b/libpldmresponder/bios_config.hpp
index dba7a09..7818ac4 100644
--- a/libpldmresponder/bios_config.hpp
+++ b/libpldmresponder/bios_config.hpp
@@ -262,8 +262,8 @@
         }
         catch (const std::exception& e)
         {
-            error("Constructs Attribute Error, {ERR_EXCEP}", "ERR_EXCEP",
-                  e.what());
+            error("Failed to construct an attribute, error - {ERROR}", "ERROR",
+                  e);
         }
     }
 
diff --git a/libpldmresponder/bios_enum_attribute.cpp b/libpldmresponder/bios_enum_attribute.cpp
index 437830e..5d436c1 100644
--- a/libpldmresponder/bios_enum_attribute.cpp
+++ b/libpldmresponder/bios_enum_attribute.cpp
@@ -119,7 +119,7 @@
         }
         else
         {
-            error("Unknown D-Bus property type, TYPE={PROP_TYPE}", "PROP_TYPE",
+            error("Unknown D-Bus property type '{TYPE}'", "TYPE",
                   dBusMap->propertyType);
             throw std::invalid_argument("Unknown D-BUS property type");
         }
@@ -253,8 +253,8 @@
     auto iter = valMap.find(newPropVal);
     if (iter == valMap.end())
     {
-        error("Could not find index for new BIOS enum, value={PROP_VAL}",
-              "PROP_VAL", std::get<std::string>(newPropVal));
+        error("Failed to find index for new BIOS enum value '{VALUE}'", "VALUE",
+              std::get<std::string>(newPropVal));
         return PLDM_ERROR;
     }
     auto currentValue = iter->second;
diff --git a/libpldmresponder/bios_integer_attribute.cpp b/libpldmresponder/bios_integer_attribute.cpp
index fa338dc..8c343c7 100644
--- a/libpldmresponder/bios_integer_attribute.cpp
+++ b/libpldmresponder/bios_integer_attribute.cpp
@@ -37,10 +37,10 @@
     if (rc != PLDM_SUCCESS)
     {
         error(
-            "Wrong field for integer attribute, ATTRIBUTE_NAME={ATTR_NAME} ERRMSG= {ERR_MSG} LOWER_BOUND={LOW_BOUND} UPPER_BOUND={UPPER_BOUND} DEFAULT_VALUE={DEF_VAL} SCALAR_INCREMENT={SCALAR_INCREMENT}",
-            "ATTR_NAME", attr.c_str(), "ERR_MSG", errmsg, "LOW_BOUND",
+            "Wrong field for integer attribute '{ATTRIBUTE}', error '{ERROR}', lower bound '{LOW_BOUND}', upper bound '{UPPER_BOUND}', default value '{DEFAULT_VALUE}' and scalar increament '{SCALAR_INCREMENT}'",
+            "ATTRIBUTE", attr, "ERROR", errmsg, "LOW_BOUND",
             integerInfo.lowerBound, "UPPER_BOUND", integerInfo.upperBound,
-            "DEF_VAL", integerInfo.defaultValue, "SCALAR_INCREMENT",
+            "DEFAULT_VALUE", integerInfo.defaultValue, "SCALAR_INCREMENT",
             integerInfo.scalarIncrement);
         throw std::invalid_argument("Wrong field for integer attribute");
     }
@@ -97,7 +97,7 @@
                                             static_cast<double>(currentValue));
     }
 
-    error("Unsupported property type on dbus: {DBUS_PROP}", "DBUS_PROP",
+    error("Unsupported property type '{TYPE}' on dbus", "TYPE",
           dBusMap->propertyType);
     throw std::invalid_argument("dbus type error");
 }
@@ -177,8 +177,8 @@
     }
     else
     {
-        error("Unsupported property type for getAttrValue: {DBUS_PROP}",
-              "DBUS_PROP", dBusMap->propertyType);
+        error("Unsupported property type '{TYPE}' for getAttrValue", "TYPE",
+              dBusMap->propertyType);
         throw std::invalid_argument("dbus type error");
     }
     return value;
@@ -202,8 +202,9 @@
     catch (const std::exception& e)
     {
         error(
-            "Error getting integer attribute '{ATTR}' from '{INTERFACE}': {ERROR}",
-            "ATTR", name, "INTERFACE", dBusMap->interface, "ERROR", e);
+            "Error getting integer attribute '{ATTRIBUTE}' at path '{PATH}' and interface '{INTERFACE}' for property '{PROPERTY}', error - {ERROR}",
+            "ATTRIBUTE", name, "PATH", dBusMap->objectPath, "INTERFACE",
+            dBusMap->interface, "PROPERTY", dBusMap->propertyName, "ERROR", e);
         return integerInfo.defaultValue;
     }
 }
diff --git a/libpldmresponder/bios_string_attribute.cpp b/libpldmresponder/bios_string_attribute.cpp
index 28dde14..d52cdc4 100644
--- a/libpldmresponder/bios_string_attribute.cpp
+++ b/libpldmresponder/bios_string_attribute.cpp
@@ -25,9 +25,8 @@
     auto iter = strTypeMap.find(strTypeTmp);
     if (iter == strTypeMap.end())
     {
-        error(
-            "Wrong string type, STRING_TYPE={STR_TYPE} ATTRIBUTE_NAME={ATTR_NAME}",
-            "STR_TYP", strTypeTmp, "ATTR_NAME", name);
+        error("Wrong string type '{TYPE}' for attribute '{ATTRIBUTE}'", "TYPE",
+              strTypeTmp, "ATTRIBUTE", name);
         throw std::invalid_argument("Wrong string type");
     }
     stringInfo.stringType = static_cast<uint8_t>(iter->second);
@@ -52,10 +51,11 @@
     if (rc != PLDM_SUCCESS)
     {
         error(
-            "Wrong field for string attribute, ATTRIBUTE_NAME={ATTR_NAME} ERRMSG={ERR_MSG} MINIMUM_STRING_LENGTH={MIN_LEN} MAXIMUM_STRING_LENGTH={MAX_LEN} DEFAULT_STRING_LENGTH={DEF_LEN} DEFAULT_STRING={DEF_STR}",
-            "ATTR_NAME", name, "ERR_MSG", errmsg, "MIN_LEN",
-            stringInfo.minLength, "MAX_LEN", stringInfo.maxLength, "DEF_LEN",
-            stringInfo.defLength, "DEF_STR", stringInfo.defString);
+            "Wrong field for string attribute '{ATTRIBUTE}', error '{ERROR}', minimum string length '{MINIMUM_STRING_LENGTH}', maximum string length '{MAXIMUM_STRING_LENGTH}', default string length '{DEFAULT_STRING_LENGTH}' and default string '{DEFAULT_STRING}'",
+            "ATTRIBUTE", name, "ERROR", errmsg, "MINIMUM_STRING_LENGTH",
+            stringInfo.minLength, "MAXIMUM_STRING_LENGTH", stringInfo.maxLength,
+            "DEFAULT_STRING_LENGTH", stringInfo.defLength, "DEFAULT_STRING",
+            stringInfo.defString);
         throw std::invalid_argument("Wrong field for string attribute");
     }
 }
@@ -89,8 +89,9 @@
     catch (const std::exception& e)
     {
         error(
-            "Error getting string attribute '{ATTR}' from '{INTERFACE}': {ERROR}",
-            "ATTR", name, "INTERFACE", dBusMap->interface, "ERROR", e);
+            "Failed to get string attribute '{ATTRIBUTE}' at path '{PATH}' and interface '{INTERFACE}' for property '{PROPERTY}', error - {ERROR}",
+            "ATTRIBUTE", name, "PATH", dBusMap->objectPath, "INTERFACE",
+            dBusMap->interface, "PROPERTY", dBusMap->propertyName, "ERROR", e);
         return stringInfo.defString;
     }
 }
@@ -145,8 +146,7 @@
     }
     catch (const std::bad_variant_access& e)
     {
-        error("invalid value passed for the property, error: {ERR_EXCEP}",
-              "ERR_EXCEP", e.what());
+        error("Invalid value passed for the property - {ERROR}", "ERROR", e);
         return PLDM_ERROR;
     }
     return PLDM_SUCCESS;
diff --git a/libpldmresponder/bios_table.cpp b/libpldmresponder/bios_table.cpp
index 1b28a53..b264ea7 100644
--- a/libpldmresponder/bios_table.cpp
+++ b/libpldmresponder/bios_table.cpp
@@ -8,6 +8,8 @@
 
 #include <fstream>
 
+PHOSPHOR_LOG2_USING;
+
 namespace pldm
 {
 namespace responder
@@ -156,8 +158,8 @@
         table.data() + tableSize, entryLength, info);
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error("Failed to encode BIOS table string entry: {LIBPLDM_ERROR}",
-                   "LIBPLDM_ERROR", rc);
+        error("Failed to encode BIOS table string entry, response code '{RC}'",
+              "RC", rc);
         throw std::runtime_error("Failed to encode BIOS table string entry");
     }
     return reinterpret_cast<pldm_bios_attr_table_entry*>(table.data() +
@@ -175,9 +177,9 @@
         table.data() + tableSize, entryLength, info);
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error(
-            "Failed to encode BIOS attribute table integer entry: {LIBPLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+        error(
+            "Failed to encode BIOS attribute table integer entry, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to encode BIOS attribute table integer entry");
     }
@@ -195,9 +197,9 @@
         entry, &defLength);
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error(
-            "Failed to decode BIOS table string definition length: {LIBPLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+        error(
+            "Failed to decode BIOS table string definition length, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to decode BIOS table string definitionlength");
     }
@@ -241,9 +243,9 @@
     int rc = pldm_bios_table_attr_entry_enum_decode_pv_num_check(entry, &pvNum);
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error(
-            "Failed to decode the number of possible values for BIOS table enum entry: {LIBPLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+        error(
+            "Failed to decode the number of possible values for BIOS table enum entry, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to decode the number of possible values for BIOS table enum entry");
     }
@@ -310,9 +312,9 @@
         str.c_str());
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error(
-            "Failed to encode BIOS attribute table string entry: {LIBPLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+        error(
+            "Failed to encode BIOS attribute table string entry, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to encode BIOS attribute table string entry");
     }
@@ -333,9 +335,9 @@
         table.data() + tableSize, entryLength, attrHandle, attrType, value);
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error(
-            "Failed to encode BIOS attribute table integer entry: {LIBPLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+        error(
+            "Failed to encode BIOS attribute table integer entry, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to encode BIOS attribute table integery entry");
     }
@@ -356,9 +358,9 @@
         handleIndices.size(), handleIndices.data());
     if (rc != PLDM_SUCCESS)
     {
-        lg2::error(
-            "Failed to encode BIOS attribute table enum entry: {LIBPLDM_ERROR}",
-            "LIBPLDM_ERROR", rc);
+        error(
+            "Failed to encode BIOS attribute table enum entry, response code '{RC}'",
+            "RC", rc);
         throw std::runtime_error(
             "Failed to encode BIOS attribute table enum entry");
     }
diff --git a/libpldmresponder/event_parser.cpp b/libpldmresponder/event_parser.cpp
index 23ffa2c..611c7ec 100644
--- a/libpldmresponder/event_parser.cpp
+++ b/libpldmresponder/event_parser.cpp
@@ -27,8 +27,8 @@
     fs::path dir(dirPath);
     if (!fs::exists(dir) || fs::is_empty(dir))
     {
-        error("Event config directory does not exist or empty, DIR={DIR_PATH}",
-              "DIR_PATH", dirPath.c_str());
+        error("Event config directory at '{PATH}' does not exist or empty",
+              "PATH", dirPath.c_str());
         return;
     }
 
@@ -39,9 +39,8 @@
         auto data = Json::parse(jsonFile, nullptr, false);
         if (data.is_discarded())
         {
-            error(
-                "Parsing Event state sensor JSON file failed, FILE={FILE_PATH}",
-                "FILE_PATH", file.path().c_str());
+            error("Failed to parse event state sensor JSON file at '{PATH}'",
+                  "PATH", file.path().c_str());
             continue;
         }
 
@@ -72,10 +71,10 @@
                 !supportedDbusPropertyTypes.contains(dbusInfo.propertyType))
             {
                 error(
-                    "Invalid dbus config, OBJPATH= {DBUS_OBJ_PATH} INTERFACE={DBUS_INTF} PROPERTY_NAME={DBUS_PROP} PROPERTY_TYPE={DBUS_PROP_TYPE}",
-                    "DBUS_OBJ_PATH", dbusInfo.objectPath.c_str(), "DBUS_INTF",
-                    dbusInfo.interface, "DBUS_PROP", dbusInfo.propertyName,
-                    "DBUS_PROP_TYPE", dbusInfo.propertyType);
+                    "Invalid dbus config at '{PATH}', interface '{DBUS_INTERFACE}', property name '{PROPERTY_NAME}' and property type '{PROPERTY_TYPE}'",
+                    "PATH", dbusInfo.objectPath.c_str(), "DBUS_INTERFACE",
+                    dbusInfo.interface, "PROPERTY_NAME", dbusInfo.propertyName,
+                    "PROPERTY_TYPE", dbusInfo.propertyType);
                 continue;
             }
 
@@ -85,9 +84,9 @@
                 (eventStates.size() != propertyValues.size()))
             {
                 error(
-                    "Invalid event state JSON config, EVENT_STATE_SIZE={EVENT_STATE_SIZE} PROPERTY_VALUE_SIZE={PROP_VAL_SIZE}",
-                    "EVENT_STATE_SIZE", eventStates.size(), "PROP_VAL_SIZE",
-                    propertyValues.size());
+                    "Invalid event state JSON config size '{EVENT_STATE_SIZE}' and property value size '{PROPERTY_VALUE_SIZE}'",
+                    "EVENT_STATE_SIZE", eventStates.size(),
+                    "PROPERTY_VALUE_SIZE", propertyValues.size());
                 continue;
             }
 
@@ -129,8 +128,8 @@
         }
         catch (const std::out_of_range& e)
         {
-            error("Invalid event state '{EVENT_STATE}': {ERROR}", "EVENT_STATE",
-                  state, "ERROR", e);
+            error("Invalid event state '{EVENT_STATE}', error - {ERROR}",
+                  "EVENT_STATE", state, "ERROR", e);
             return PLDM_ERROR_INVALID_DATA;
         }
 
@@ -141,7 +140,7 @@
         catch (const std::exception& e)
         {
             error(
-                "Error setting property value '{PROPERTY}' on interface '{INTERFACE}' at '{PATH}': {ERROR}",
+                "Failed to  set property '{PROPERTY}' on interface '{INTERFACE}' at path '{PATH}', error - {ERROR}",
                 "PROPERTY", dbusMapping.propertyName, "INTERFACE",
                 dbusMapping.interface, "PATH", dbusMapping.objectPath, "ERROR",
                 e);
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index d9702ff..be8f573 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -154,8 +154,9 @@
     }
     catch (const std::exception& e)
     {
-        error("Failed building FRU table due to inventory lookup: {ERROR}",
-              "ERROR", e);
+        error(
+            "Failed to build FRU table due to inventory lookup, error - {ERROR}",
+            "ERROR", e);
         return;
     }
 
@@ -198,8 +199,8 @@
                 catch (const std::exception& e)
                 {
                     error(
-                        "Config JSONs missing for the item interface type, interface = {INTF}",
-                        "INTF", interface.first);
+                        "Config JSONs missing for the item '{INTERFACE}', error - {ERROR}",
+                        "INTERFACE", interface.first, "ERROR", e);
                     break;
                 }
             }
@@ -211,8 +212,8 @@
     if (rc < 0)
     {
         // pldm_entity_assocation_pdr_add() assert()ed on failure
-        error("Failed to add PLDM entity association PDR: {LIBPLDM_ERROR}",
-              "LIBPLDM_ERROR", rc);
+        error("Failed to add PLDM entity association PDR, response code '{RC}'",
+              "RC", rc);
         throw std::runtime_error("Failed to add PLDM entity association PDR");
     }
 
@@ -244,8 +245,8 @@
     }
     catch (const std::exception& e)
     {
-        error("failed to make a d-bus call Asociation, ERROR= {ERR_EXCEP}",
-              "ERR_EXCEP", e.what());
+        error("Failed to make a d-bus call Asociation, error - {ERROR}",
+              "ERROR", e);
         return {};
     }
     return currentBmcVersion;
diff --git a/libpldmresponder/fru_parser.cpp b/libpldmresponder/fru_parser.cpp
index c875ffa..364a26b 100644
--- a/libpldmresponder/fru_parser.cpp
+++ b/libpldmresponder/fru_parser.cpp
@@ -48,9 +48,8 @@
     auto data = Json::parse(jsonFile, nullptr, false);
     if (data.is_discarded())
     {
-        error(
-            "Parsing FRU Dbus Lookup Map config file failed, FILE={JSON_PATH}",
-            "JSON_PATH", masterJsonPath.c_str());
+        error("Failed to parse FRU Dbus Lookup Map config file '{PATH}'",
+              "PATH", masterJsonPath.c_str());
         std::abort();
     }
     std::map<Interface, EntityType> defIntfToEntityType;
@@ -65,7 +64,8 @@
         }
         catch (const std::exception& e)
         {
-            error("FRU DBus lookup map format error: {ERROR}", "ERROR", e);
+            error("Failure in FRU dbus lookup map format, error - {ERROR}",
+                  "ERROR", e);
             throw InternalFailure();
         }
     }
@@ -117,8 +117,8 @@
         auto data = Json::parse(jsonFile, nullptr, false);
         if (data.is_discarded())
         {
-            error("Parsing FRU config file failed, FILE={FILE_PATH}",
-                  "FILE_PATH", file.path().c_str());
+            error("Failed to parse FRU config file at '{PATH}'", "PATH",
+                  file.path().c_str());
             throw InternalFailure();
         }
 
diff --git a/libpldmresponder/pdr_numeric_effecter.hpp b/libpldmresponder/pdr_numeric_effecter.hpp
index b213912..a425da3 100644
--- a/libpldmresponder/pdr_numeric_effecter.hpp
+++ b/libpldmresponder/pdr_numeric_effecter.hpp
@@ -217,9 +217,9 @@
         catch (const std::exception& e)
         {
             error(
-                "D-Bus object path does not exist, effecter ID: {EFFECTER_ID}",
-                "EFFECTER_ID", static_cast<uint16_t>(pdr->effecter_id));
-            continue;
+                "D-Bus object path does not exist for effecter ID '{EFFECTER_ID}', error - {ERROR}",
+                "EFFECTER_ID", static_cast<uint16_t>(pdr->effecter_id), "ERROR",
+                e);
         }
         dbusMappings.emplace_back(std::move(dbusMapping));
         pdr->effecter_id = handler.getNextEffecterId();
diff --git a/libpldmresponder/pdr_state_effecter.hpp b/libpldmresponder/pdr_state_effecter.hpp
index 17a7af9..4e3031a 100644
--- a/libpldmresponder/pdr_state_effecter.hpp
+++ b/libpldmresponder/pdr_state_effecter.hpp
@@ -43,7 +43,7 @@
             if (!statesSize)
             {
                 error(
-                    "Malformed PDR JSON return pdrEntry;- no state set info, TYPE={STATE_EFFECTER_PDR}",
+                    "Malformed PDR JSON return pdrEntry; no state set info for state effecter pdr '{STATE_EFFECTER_PDR}'",
                     "STATE_EFFECTER_PDR",
                     static_cast<unsigned>(PLDM_STATE_EFFECTER_PDR));
                 throw InternalFailure();
@@ -158,7 +158,7 @@
             catch (const std::exception& e)
             {
                 error(
-                    "Failed to create effecter PDR, D-Bus object '{PATH}' returned {ERROR}",
+                    "Failed to create effecter PDR, D-Bus object '{PATH}' returned error - {ERROR}",
                     "PATH", objectPath, "ERROR", e);
                 break;
             }
diff --git a/libpldmresponder/pdr_state_sensor.hpp b/libpldmresponder/pdr_state_sensor.hpp
index ea24497..dd9a992 100644
--- a/libpldmresponder/pdr_state_sensor.hpp
+++ b/libpldmresponder/pdr_state_sensor.hpp
@@ -42,7 +42,7 @@
             if (!statesSize)
             {
                 error(
-                    "Malformed PDR JSON return pdrEntry;- no state set info, TYPE={STATE_SENSOR_PDR}",
+                    "Malformed PDR JSON return pdrEntry; no state set info for state sensor pdr '{STATE_SENSOR_PDR}'",
                     "STATE_SENSOR_PDR",
                     static_cast<int>(PLDM_STATE_SENSOR_PDR));
                 throw InternalFailure();
@@ -169,7 +169,7 @@
             catch (const std::exception& e)
             {
                 error(
-                    "Failed to create sensor PDR, D-Bus object '{PATH}' returned {ERROR}",
+                    "Failed to create sensor PDR, D-Bus object '{PATH}' returned error - {ERROR}",
                     "PATH", objectPath, "ERROR", e);
                 break;
             }
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index e7f6d42..cfc776f 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -98,8 +98,9 @@
     if (dBusValues.size() != pv.size())
     {
         error(
-            "dBusValues size is not equal to pv size, dBusValues Size: {DBUS_VAL_SIZE}, pv Size: {PV_SIZE}",
-            "DBUS_VAL_SIZE", dBusValues.size(), "PV_SIZE", pv.size());
+            "DBusValues size '{DBUS_VALUE_SIZE}' is not equal to pv size'{PROPERTY_VALUE_SIZE}'.",
+            "DBUS_VALUE_SIZE", dBusValues.size(), "PROPERTY_VALUE_SIZE",
+            pv.size());
         return {};
     }
 
@@ -147,8 +148,7 @@
         }
         else
         {
-            error("Unknown D-Bus property type, TYPE={OTHER_TYPE}",
-                  "OTHER_TYPE", type.c_str());
+            error("Unknown D-Bus property type '{TYPE}'", "TYPE", type);
             return {};
         }
 
@@ -218,7 +218,8 @@
     // uint8_t(FRU Field Type), uint8_t(FRU Field Length)
     if (fruLen < fruRecordDataFormatLength)
     {
-        lg2::error("Invalid fru len: {FRULEN}", "FRULEN", fruLen);
+        error("Invalid FRU length '{LENGTH}' while parsing FRU record table",
+              "LENGTH", fruLen);
         return {};
     }
 
diff --git a/libpldmresponder/pdr_utils.hpp b/libpldmresponder/pdr_utils.hpp
index 44dfff3..01fe223 100644
--- a/libpldmresponder/pdr_utils.hpp
+++ b/libpldmresponder/pdr_utils.hpp
@@ -98,8 +98,7 @@
     std::ifstream jsonFile(path);
     if (!jsonFile.is_open())
     {
-        error("Error opening PDR JSON file, PATH={JSON_PATH}", "JSON_PATH",
-              path);
+        error("Error opening PDR JSON file at '{PATH}'", "PATH", path);
         return {};
     }
 
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index 2a19e66..be554dd 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -70,7 +70,8 @@
 {
     for (const auto& directory : dir)
     {
-        info("checking if : {DIR} exists", "DIR", directory);
+        info("Checking if directory '{DIRECTORY}' exists", "DIRECTORY",
+             directory);
         if (!fs::exists(directory))
         {
             return;
@@ -136,20 +137,22 @@
             catch (const InternalFailure& e)
             {
                 error(
-                    "PDR config directory '{PATH}' does not exist or empty for '{TYPE}' pdr: {ERROR}",
-                    "TYPE", pdrType, "PATH", dirEntry.path(), "ERROR", e);
+                    "PDR config directory '{PATH}' does not exist or empty for '{TYPE}' pdr, error - {ERROR}",
+                    "PATH", dirEntry.path(), "TYPE", pdrType, "ERROR", e);
             }
             catch (const Json::exception& e)
             {
-                error("Failed parsing PDR JSON file for '{TYPE}' pdr: {ERROR}",
-                      "TYPE", pdrType, "ERROR", e);
+                error(
+                    "Failed to parse PDR JSON file for '{TYPE}' pdr, error - {ERROR}",
+                    "TYPE", pdrType, "ERROR", e);
                 pldm::utils::reportError(
                     "xyz.openbmc_project.PLDM.Error.Generate.PDRJsonFileParseFail");
             }
             catch (const std::exception& e)
             {
-                error("Failed parsing PDR JSON file for '{TYPE}' pdr: {ERROR}",
-                      "TYPE", pdrType, "ERROR", e);
+                error(
+                    "Failed to parse PDR JSON file for '{TYPE}' pdr, error - {ERROR}",
+                    "TYPE", pdrType, "ERROR", e);
                 pldm::utils::reportError(
                     "xyz.openbmc_project.PLDM.Error.Generate.PDRJsonFileParseFail");
             }
@@ -269,8 +272,9 @@
     }
     catch (const std::exception& e)
     {
-        error("Error accessing PDR, HANDLE={REC_HANDLE} ERROR={ERR_EXCEP}",
-              "REC_HANDLE", recordHandle, "ERR_EXCEP", e.what());
+        error(
+            "Failed to access PDR record handle '{RECORD_HANDLE}', error - {ERROR}",
+            "RECORD_HANDLE", recordHandle, "ERROR", e);
         return CmdHandler::ccOnlyResponse(request, PLDM_ERROR);
     }
     return response;
@@ -387,7 +391,8 @@
         }
         catch (const std::out_of_range& e)
         {
-            error("Error in handling platform event msg: {ERROR}", "ERROR", e);
+            error("Failed to handle platform event msg, error - {ERROR}",
+                  "ERROR", e);
             return CmdHandler::ccOnlyResponse(request, PLDM_ERROR_INVALID_DATA);
         }
     }
@@ -683,8 +688,8 @@
     if (rc != PLDM_SUCCESS)
     {
         error(
-            "Reponse to GetNumericEffecterValue failed RC={RC} for EffectorId={EFFECTER_ID} ",
-            "RC", rc, "EFFECTER_ID", effecterId);
+            "Failed to get response of GetNumericEffecterValue for effecter ID '{EFFECTERID}', response code '{RC}'.",
+            "EFFECTERID", effecterId, "RC", rc);
         return ccOnlyResponse(request, rc);
     }
     return response;
@@ -872,9 +877,9 @@
         if (sensorRearmCount > tmpCompSensorCnt)
         {
             error(
-                "The requester sent wrong sensorRearm count for the sensor, SENSOR_ID={SENSOR_ID} SENSOR_REARM_COUNT={SENSOR_REARM_CNT}",
-                "SENSOR_ID", sensorId, "SENSOR_REARM_CNT",
-                (uint16_t)sensorRearmCount);
+                "The requester sent wrong sensor rearm count '{SENSOR_REARM_COUNT}' for the sensor ID '{SENSORID}'.",
+                "SENSOR_REARM_COUNT", (uint16_t)sensorRearmCount, "SENSORID",
+                sensorId);
             break;
         }
 
@@ -942,9 +947,9 @@
         if (compEffecterCnt > pdr->composite_effecter_count)
         {
             error(
-                "The requester sent wrong composite effecter count for the effecter, EFFECTER_ID={EFFECTER_ID} COMP_EFF_CNT={COMP_EFF_CNT}",
-                "EFFECTER_ID", effecterId, "COMP_EFF_CNT",
-                (uint16_t)compEffecterCnt);
+                "The requester sent wrong composite effecter count '{COMPOSITE_EFFECTER_COUNT}' for the effecter ID '{EFFECTERID}'.",
+                "COMPOSITE_EFFECTER_COUNT", (uint16_t)compEffecterCnt,
+                "EFFECTERID", effecterId);
             return false;
         }
 
@@ -984,8 +989,9 @@
     if (rc != PLDM_SUCCESS)
     {
         instanceIdDb->free(eid, instanceId);
-        error("Failed to encode_set_event_receiver_req, rc = {RC}", "RC",
-              lg2::hex, rc);
+        error(
+            "Failed to encode set event receiver request, response code '{RC}'",
+            "RC", lg2::hex, rc);
         return;
     }
 
@@ -1003,7 +1009,7 @@
         if (rc || completionCode)
         {
             error(
-                "Failed to decode setEventReceiver command response, rc = {RC}, cc = {CC}",
+                "Failed to decode setEventReceiver command, response code '{RC}' and completion code '{CC}'",
                 "RC", rc, "CC", (unsigned)completionCode);
             pldm::utils::reportError(
                 "xyz.openbmc_project.bmc.pldm.InternalFailure");
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index b50a1f4..ac07767 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -361,9 +361,9 @@
             if (compEffecterCnt > pdr->composite_effecter_count)
             {
                 error(
-                    "The requester sent wrong composite effecter count for the effecter, EFFECTER_ID={EFFECTER_ID} COMP_EFF_CNT={COMP_EFF_CNT}",
-                    "EFFECTER_ID", (unsigned)effecterId, "COMP_EFF_CNT",
-                    (unsigned)compEffecterCnt);
+                    "The requester sent wrong composite effecter count '{COMPOSITE_EFFECTER_COUNT}' for the effecter ID '{EFFECTERID}'.",
+                    "COMPOSITE_EFFECTER_COUNT", (unsigned)compEffecterCnt,
+                    "EFFECTERID", (unsigned)effecterId);
                 return PLDM_ERROR_INVALID_DATA;
             }
             break;
@@ -392,10 +392,10 @@
                     !(states->states[bitfieldIndex].byte & (1 << bit)))
                 {
                     error(
-                        "Invalid state set value, EFFECTER_ID={EFFECTER_ID} VALUE={EFFECTER_STATE} COMPOSITE_EFFECTER_ID={CURR_STATE} DBUS_PATH={DBUS_OBJ_PATH}",
-                        "EFFECTER_ID", (unsigned)effecterId, "EFFECTER_STATE",
+                        "Invalid state set value for effecter ID '{EFFECTERID}', effecter state '{EFFECTER_STATE}', composite effecter ID '{COMPOSITE_EFFECTER_ID}' and path '{PATH}'.",
+                        "EFFECTERID", (unsigned)effecterId, "EFFECTER_STATE",
                         (unsigned)stateField[currState].effecter_state,
-                        "CURR_STATE", (unsigned)currState, "DBUS_OBJ_PATH",
+                        "COMPOSITE_EFFECTER_COUNT", (unsigned)currState, "PATH",
                         dbusMappings[currState].objectPath.c_str());
                     rc = PLDM_PLATFORM_SET_EFFECTER_UNSUPPORTED_SENSORSTATE;
                     break;
@@ -416,11 +416,10 @@
                     catch (const std::exception& e)
                     {
                         error(
-                            "Error setting property, ERROR={ERR_EXCEP} PROPERTY={DBUS_PROP} INTERFACE={DBUS_INTF} PATH={DBUS_OBJ_PATH}",
-                            "ERR_EXCEP", e.what(), "DBUS_PROP",
-                            dbusMapping.propertyName, "DBUS_INTF",
+                            "Failed to set property '{PROPERTY}' of interface '{INTERFACE}' at path '{PATH}', error - {ERROR}",
+                            "PROPERTY", dbusMapping.propertyName, "DBUS_INTF",
                             dbusMapping.interface, "DBUS_OBJ_PATH",
-                            dbusMapping.objectPath.c_str());
+                            dbusMapping.objectPath.c_str(), "ERROR", e);
                         return PLDM_ERROR;
                     }
                 }
@@ -436,8 +435,8 @@
         catch (const std::out_of_range& e)
         {
             error(
-                "the effecterId does not exist. effecter id: {EFFECTER_ID} {ERR_EXCEP}",
-                "EFFECTER_ID", (unsigned)effecterId, "ERR_EXCEP", e.what());
+                "The effecter ID '{EFFECTERID}' does not exist, error - {ERROR}.",
+                "EFFECTERID", (unsigned)effecterId, "ERROR", e);
         }
 
         return rc;
diff --git a/libpldmresponder/platform_config.cpp b/libpldmresponder/platform_config.cpp
index 5c46199..8bc6b06 100644
--- a/libpldmresponder/platform_config.cpp
+++ b/libpldmresponder/platform_config.cpp
@@ -1,5 +1,9 @@
 #include "platform_config.hpp"
 
+#include <phosphor-logging/lg2.hpp>
+
+PHOSPHOR_LOG2_USING;
+
 namespace pldm
 {
 namespace responder
@@ -109,7 +113,7 @@
             catch (const std::exception& e)
             {
                 error(
-                    "Error getting Names property at '{PATH}' on '{INTERFACE}': {ERROR}",
+                    "Failed to get Names property at '{PATH}' on interface '{INTERFACE}', error - {ERROR}",
                     "PATH", objectPath, "INTERFACE", compatibleInterface,
                     "ERROR", e);
             }
@@ -117,8 +121,9 @@
     }
     catch (const std::exception& e)
     {
-        error("Failed to make a d-bus call to get platform name {ERROR}",
-              "ERROR", e);
+        error(
+            "Failed to make a d-bus call to get platform name, error - {ERROR}",
+            "ERROR", e);
     }
     return std::nullopt;
 }
diff --git a/libpldmresponder/platform_config.hpp b/libpldmresponder/platform_config.hpp
index 16e934c..b8a8b6e 100644
--- a/libpldmresponder/platform_config.hpp
+++ b/libpldmresponder/platform_config.hpp
@@ -2,10 +2,6 @@
 #include "common/utils.hpp"
 #include "pldmd/handler.hpp"
 
-#include <phosphor-logging/lg2.hpp>
-
-PHOSPHOR_LOG2_USING;
-
 namespace pldm
 {
 namespace responder
diff --git a/libpldmresponder/platform_numeric_effecter.hpp b/libpldmresponder/platform_numeric_effecter.hpp
index 44b5aab..1cad4a4 100644
--- a/libpldmresponder/platform_numeric_effecter.hpp
+++ b/libpldmresponder/platform_numeric_effecter.hpp
@@ -223,7 +223,7 @@
     }
     else
     {
-        error("Wrong field effecterDataSize...");
+        error("Unknown Effecter Size {SIZE}", "SIZE", effecterDataSize);
         return {PLDM_ERROR, {}};
     }
 }
@@ -295,7 +295,8 @@
 
     if (effecterValueLength != effecterValueArrayLength)
     {
-        error("effecter data size is incorrect.");
+        error("Incorrect effecter data size {SIZE}", "SIZE",
+              effecterValueLength);
         return PLDM_ERROR_INVALID_DATA;
     }
 
@@ -321,17 +322,17 @@
         catch (const std::exception& e)
         {
             error(
-                "Error setting property, ERROR={ERR_EXCEP} PROPERTY={DBUS_PROP} INTERFACE={DBUS_INTF} PATH={DBUS_OBJ_PATH}",
-                "ERR_EXCEP", e.what(), "DBUS_PROP", dbusMapping.propertyName,
-                "DBUS_INTF", dbusMapping.interface, "DBUS_OBJ_PATH",
-                dbusMapping.objectPath.c_str());
+                "Failed to set property '{PROPERTY}', interface '{INTERFACE}' and path '{PATH}', error - {ERROR}",
+                "PROPERTY", dbusMapping.propertyName, "INTERFACE",
+                dbusMapping.interface, "PATH", dbusMapping.objectPath.c_str(),
+                "ERROR", e);
             return PLDM_ERROR;
         }
     }
     catch (const std::out_of_range& e)
     {
-        error("Unknown effecter ID : {EFFECTER_ID} {ERR_EXCEP}", "EFFECTER_ID",
-              effecterId, "ERR_EXCEP", e.what());
+        error("Unknown effecter ID '{EFFECTERID}', error - {ERROR}",
+              "EFFECTERID", effecterId, "ERROR", e);
         return PLDM_ERROR;
     }
 
@@ -415,7 +416,7 @@
         }
         default:
         {
-            error("Unknown Effecter Size");
+            error("Unknown Effecter Size {SIZE}", "SIZE", effecterDataSize);
             return PLDM_ERROR;
         }
     }
@@ -467,8 +468,7 @@
     }
     else
     {
-        error("Property Type [{PROPERTYTYPE}] not supported", "PROPERTYTYPE",
-              propertyType);
+        error("Property type '{TYPE}' not supported", "TYPE", propertyType);
     }
     return PLDM_ERROR;
 }
@@ -529,8 +529,8 @@
 
     if (!pdr)
     {
-        error("The Numeric Effecter not found EFFECTERID={EFFECTERID}",
-              "EFFECTERID", effecterId);
+        error("Failed to find numeric effecter ID {EFFECTERID}", "EFFECTERID",
+              effecterId);
         return PLDM_PLATFORM_INVALID_EFFECTER_ID;
     }
 
@@ -555,11 +555,11 @@
     catch (const std::exception& e)
     {
         error(
-            "Dbus Mapping or the Dbus query for the Effecter failed for effecter id: {EFFECTER_ID}, {ERR_EXCEP}",
-            "EFFECTER_ID", effecterId, "ERR_EXCEP", e.what());
+            "Failed to do dbus mapping or the dbus query for the effecter ID '{EFFECTERID}', error - {ERROR}",
+            "EFFECTERID", effecterId, "ERROR", e);
         error(
-            "Dbus Details objPath : [{OBJ_PATH}] interface : [{INTF}], property : [{PROPERTY}]",
-            "OBJ_PATH", dbusMapping.objectPath.c_str(), "INTF",
+            "Dbus Details path [{PATH}], interface [{INTERFACE}] and  property [{PROPERTY}]",
+            "PATH", dbusMapping.objectPath.c_str(), "INTERFACE",
             dbusMapping.interface.c_str(), "PROPERTY",
             dbusMapping.propertyName.c_str());
         return PLDM_ERROR;
diff --git a/libpldmresponder/platform_state_effecter.hpp b/libpldmresponder/platform_state_effecter.hpp
index 247dbfd..a23732b 100644
--- a/libpldmresponder/platform_state_effecter.hpp
+++ b/libpldmresponder/platform_state_effecter.hpp
@@ -60,7 +60,7 @@
                   PLDM_STATE_EFFECTER_PDR);
     if (stateEffecterPDRs.empty())
     {
-        error("Failed to get record by PDR type");
+        error("Failed to get StateEffecterPDR record");
         return PLDM_PLATFORM_INVALID_EFFECTER_ID;
     }
 
@@ -81,8 +81,9 @@
         if (compEffecterCnt > pdr->composite_effecter_count)
         {
             error(
-                "The requester sent wrong composite effecter count for the effecter, EFFECTER_ID={EFFECTER_ID} COMP_EFF_CNT={COMP_EFF_CNT}",
-                "EFFECTER_ID", effecterId, "COMP_EFF_CNT", compEffecterCnt);
+                "The requester sent wrong composite effecter count '{COMPOSITE_EFFECTER_COUNT}' for the effecter ID '{EFFECTERID}'",
+                "EFFECTERID", effecterId, "COMPOSITE_EFFECTER_COUNT",
+                compEffecterCnt);
             return PLDM_ERROR_INVALID_DATA;
         }
         break;
@@ -100,7 +101,7 @@
                      dbusValMaps] = handler.getDbusObjMaps(effecterId);
         if (dbusMappings.empty() || dbusValMaps.empty())
         {
-            error("dbusMappings for effecter id : {EFFECTER_ID} is missing",
+            error("DbusMappings for effecter ID '{EFFECTER_ID}' is missing",
                   "EFFECTER_ID", effecterId);
             return PLDM_ERROR;
         }
@@ -118,13 +119,13 @@
             if (states->possible_states_size < bitfieldIndex ||
                 !(states->states[bitfieldIndex].byte & (1 << bit)))
             {
-                error(
-                    "Invalid state set value, EFFECTER_ID={EFFECTER_ID} VALUE={EFFECTER_STATE} COMPOSITE_EFFECTER_ID={CURR_STATE} DBUS_PATH={DBUS_OBJ_PATH}",
-                    "EFFECTER_ID", effecterId, "EFFECTER_STATE",
-                    stateField[currState].effecter_state, "CURR_STATE",
-                    currState, "DBUS_OBJ_PATH",
-                    dbusMappings[currState].objectPath.c_str());
                 rc = PLDM_PLATFORM_SET_EFFECTER_UNSUPPORTED_SENSORSTATE;
+                error(
+                    "Invalid state set value for effecter ID '{EFFECTER_ID}', effecter state '{EFFECTER_STATE}', composite effecter ID '{COMPOSITE_EFFECTER_ID}' and path '{PATH}', response code '{RC}'",
+                    "EFFECTER_ID", effecterId, "EFFECTER_STATE",
+                    stateField[currState].effecter_state,
+                    "COMPOSITE_EFFECTER_ID", currState, "PATH",
+                    dbusMappings[currState].objectPath.c_str(), "RC", rc);
                 break;
             }
             const DBusMapping& dbusMapping = dbusMappings[currState];
@@ -142,11 +143,10 @@
                 catch (const std::exception& e)
                 {
                     error(
-                        "Error setting property, ERROR={ERR_EXCEP} PROPERTY={DBUS_PROP} INTERFACE={DBUS_INTF} PATH={DBUS_OBJ_PATH}",
-                        "ERR_EXCEP", e.what(), "DBUS_PROP",
-                        dbusMapping.propertyName, "DBUS_INTF",
-                        dbusMapping.interface, "DBUS_OBJ_PATH",
-                        dbusMapping.objectPath.c_str());
+                        "Failed to set property '{PROPERTY}', interface '{INTERFACE}' and path '{PATH}', error - '{ERROR}'",
+                        "PROPERTY", dbusMapping.propertyName, "INTERFACE",
+                        dbusMapping.interface, "PATH",
+                        dbusMapping.objectPath.c_str(), "ERROR", e);
                     return PLDM_ERROR;
                 }
             }
@@ -161,8 +161,8 @@
     }
     catch (const std::out_of_range& e)
     {
-        error("Unknown effecter ID : {EFFECTER_ID} {ERR_EXCEP}", "EFFECTER_ID",
-              effecterId, "ERR_EXCEP", e.what());
+        error("Unknown effecter ID '{EFFECTERID}', error - {ERROR}",
+              "EFFECTERID", effecterId, "ERROR", e);
         return PLDM_ERROR;
     }
 
diff --git a/libpldmresponder/platform_state_sensor.hpp b/libpldmresponder/platform_state_sensor.hpp
index e6f7629..960f89d 100644
--- a/libpldmresponder/platform_state_sensor.hpp
+++ b/libpldmresponder/platform_state_sensor.hpp
@@ -54,9 +54,8 @@
     catch (const std::exception& e)
     {
         error(
-            "Get StateSensor EventState from dbus Error, interface : {DBUS_OBJ_PATH}, exception : {ERR_EXCEP}",
-            "DBUS_OBJ_PATH", dbusMapping.objectPath.c_str(), "ERR_EXCEP",
-            e.what());
+            "Failed to get state sensor event state from dbus interface '{PATH}', error - {ERROR}.",
+            "PATH", dbusMapping.objectPath.c_str(), "ERROR", e);
     }
 
     return PLDM_SENSOR_UNKNOWN;
@@ -101,7 +100,7 @@
     getRepoByType(handler.getRepo(), stateSensorPDRs, PLDM_STATE_SENSOR_PDR);
     if (stateSensorPDRs.empty())
     {
-        error("Failed to get record by PDR type");
+        error("Failed to get StateSensorPDR record.");
         return PLDM_PLATFORM_INVALID_SENSOR_ID;
     }
 
@@ -122,8 +121,8 @@
         if (sensorRearmCnt > compSensorCnt)
         {
             error(
-                "The requester sent wrong sensorRearm count for the sensor, SENSOR_ID={SENSOR_ID} SENSOR_REARM_COUNT={SENSOR_REARM_CNT}",
-                "SENSOR_ID", sensorId, "SENSOR_REARM_CNT", sensorRearmCnt);
+                "The requester sent wrong sensor rearm count '{SENSOR_REARM_COUNT}' for the sensor ID '{SENSORID}'",
+                "SENSORID", sensorId, "SENSOR_REARM_COUNT", sensorRearmCnt);
             return PLDM_PLATFORM_REARM_UNAVAILABLE_IN_PRESENT_STATE;
         }
 
@@ -149,7 +148,7 @@
 
         if (dbusMappings.empty() || dbusValMaps.empty())
         {
-            error("dbusMappings for sensor id : {SENSOR_ID} is missing",
+            error("DbusMappings for sensor ID '{SENSOR_ID}' is missing",
                   "SENSOR_ID", sensorId);
             return PLDM_ERROR;
         }
@@ -198,8 +197,8 @@
     }
     catch (const std::out_of_range& e)
     {
-        error("the sensorId does not exist. sensor id: {SENSOR_ID} {ERR_EXCEP}",
-              "SENSOR_ID", sensorId, "ERR_EXCEP", e.what());
+        error("The sensor ID '{SENSORID}' does not exist, error - {ERROR}",
+              "SENSORID", sensorId, "ERROR", e);
         rc = PLDM_ERROR;
     }
 
