boot-block: look for a callout in the entry
phosphor-logging callouts always start with a CALLOUT_ in the additional
data entry. Look for this to determine if a callout is present in the
log.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I721e794dc4610a18705e1b0d75e545b14f844402
diff --git a/log_manager.cpp b/log_manager.cpp
index 5be474f..cf2a795 100644
--- a/log_manager.cpp
+++ b/log_manager.cpp
@@ -268,8 +268,29 @@
return std::get<bool>(property);
}
+bool Manager::isCalloutPresent(const Entry& entry)
+{
+ for (const auto& c : entry.additionalData())
+ {
+ if (c.find("CALLOUT_") != std::string::npos)
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
void Manager::checkQuiesceOnError(const Entry& entry)
{
+
+ if (!isCalloutPresent(entry))
+ {
+ return;
+ }
+
+ logging::log<logging::level::INFO>(
+ "QuiesceOnError set and callout present");
// TODO in later commit in this series
}