InstanceIdDb: Drop use of phosphor-logging
The InstanceIdDb class has multiple consumers, each using different
logging strategies. Don't force the use of phosphor-logging where it is
not desired.
Change-Id: I5ca2223f86888b8a1682a845f31b4ced09dd0972
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/pldmd/instance_id.hpp b/pldmd/instance_id.hpp
index fae52c5..5de0963 100644
--- a/pldmd/instance_id.hpp
+++ b/pldmd/instance_id.hpp
@@ -2,16 +2,12 @@
#include "libpldm/instance-id.h"
-#include <phosphor-logging/lg2.hpp>
-
#include <cerrno>
#include <cstdint>
#include <exception>
#include <string>
#include <system_error>
-PHOSPHOR_LOG2_USING;
-
namespace pldm
{
@@ -45,11 +41,14 @@
~InstanceIdDb()
{
- int rc = pldm_instance_db_destroy(pldmInstanceIdDb);
- if (rc)
- {
- error("pldm_instance_db_destroy failed, rc= {RC}", "RC", rc);
- }
+ /*
+ * Abandon error-reporting. We shouldn't throw an exception from the
+ * destructor, and the class has multiple consumers using incompatible
+ * logging strategies.
+ *
+ * Broadly, it should be possible to use strace to investigate.
+ */
+ pldm_instance_db_destroy(pldmInstanceIdDb);
}
/** @brief Allocate an instance ID for the given terminus