diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/elog.cpp | 6 | ||||
-rw-r--r-- | src/elog.hpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/elog.cpp b/src/elog.cpp index 9cd18c8..ba6e522 100644 --- a/src/elog.cpp +++ b/src/elog.cpp @@ -24,6 +24,12 @@ namespace monitoring void ElogBase::operator()(Context ctx) { + if (ctx == Context::START) + { + // No action should be taken as this call back is being called from + // daemon Startup. + return; + } log(); } diff --git a/src/elog.hpp b/src/elog.hpp index 996fd58..24e2009 100644 --- a/src/elog.hpp +++ b/src/elog.hpp @@ -154,6 +154,12 @@ class ElogWithMetadataCapture : public IndexedCallback */ void operator()(Context ctx) override { + if (ctx == Context::START) + { + // No action should be taken as this call back is being called from + // daemon Startup. + return; + } auto data = captureMetadata(); phosphor::logging::report<errorType>(metadataType(data.c_str())); |