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");
     }
