summaryrefslogtreecommitdiffstats
path: root/sdevent/io.hpp
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2017-11-07 04:58:14 -0600
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-11-16 20:35:43 +0000
commit6088558429fbe5f723783b4220b6ac1c9096cde9 (patch)
tree3fb71a2014e4e65f3070711c3219442da042d308 /sdevent/io.hpp
parent67967f9a3f8e779d897a66cc6d559783911b2c14 (diff)
downloadphosphor-fan-presence-6088558429fbe5f723783b4220b6ac1c9096cde9.tar.gz
phosphor-fan-presence-6088558429fbe5f723783b4220b6ac1c9096cde9.zip
Fix up InternalFailure to include metadata
Scope is to add missing logs for InternalFailure errors Change-Id: I12c958127c1303fba0057914682e651457a0e547 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'sdevent/io.hpp')
-rw-r--r--sdevent/io.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sdevent/io.hpp b/sdevent/io.hpp
index 93625a0..f511cf0 100644
--- a/sdevent/io.hpp
+++ b/sdevent/io.hpp
@@ -17,6 +17,7 @@ namespace event
namespace io
{
+using namespace phosphor::logging;
/** @class IO
* @brief Provides C++ bindings to the sd_event_source* io functions.
*/
@@ -67,7 +68,10 @@ class IO
cb.get());
if (rc < 0)
{
- phosphor::logging::elog<InternalFailure>();
+ log<level::ERR>("Error in call to sd_event_add_io",
+ entry("RC=%d", rc),
+ entry("FD=%d", fd));
+ elog<InternalFailure>();
}
src = decltype(src){source, std::false_type()};
OpenPOWER on IntegriCloud