summaryrefslogtreecommitdiffstats
path: root/log_manager.hpp
diff options
context:
space:
mode:
authorNagaraju Goruganti <ngorugan@in.ibm.com>2017-11-30 02:12:45 -0600
committerNagaraju Goruganti <ngorugan@in.ibm.com>2017-12-01 06:26:40 -0600
commite4b0b77180adc4c2f63e83abbf849f09fd399055 (patch)
treef0f9a1bd84561134dbbdcffc81fe534ab6f94bf4 /log_manager.hpp
parent979ed1cce24fa0cffd4fe414b8a56e17ec032b14 (diff)
downloadphosphor-logging-e4b0b77180adc4c2f63e83abbf849f09fd399055.tar.gz
phosphor-logging-e4b0b77180adc4c2f63e83abbf849f09fd399055.zip
Roll errors after reaching Cap size
Fixes openbmc/openbmc#2687 -cap on error exists to deal with small flashes, right now the cap is 100 for high severity errors and it is 10 for info(and below) severity) errors. -previous policy was to stop logging new errors once cap is reached for high severity errors. -based on feedback from field engineers, it's better to log new errors, external tools will typically periodically read and store errors, so we won't lose them.so the new policy now is to roll errors. Change-Id: I18b509d81c076fcb80667300cbfda050027bb422 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Diffstat (limited to 'log_manager.hpp')
-rw-r--r--log_manager.hpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/log_manager.hpp b/log_manager.hpp
index 399a243..b165ff3 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -54,8 +54,7 @@ class Manager : public details::ServerObject<details::ManagerIface>
Manager(sdbusplus::bus::bus& bus, const char* objPath) :
details::ServerObject<details::ManagerIface>(bus, objPath),
busLog(bus),
- entryId(0),
- capped(false) {};
+ entryId(0){};
/*
* @fn commit()
@@ -112,21 +111,14 @@ class Manager : public details::ServerObject<details::ManagerIface>
/** @brief Persistent map of Entry dbus objects and their ID */
std::map<uint32_t, std::unique_ptr<Entry>> entries;
+ /** @brief List of error ids for high severity errors */
+ std::list<uint32_t> realErrors;
+
/** @brief List of error ids for Info(and below) severity */
std::list<uint32_t> infoErrors;
/** @brief Id of last error log entry */
uint32_t entryId;
-
- /**
- * @brief Flag to log error for the first time when error cap is
- * reached.
- * @details Flag used to log error message for the first time when the
- * error cap value is reached. It is reset when user delete's error
- * entries and total entries existing is less than the error cap
- * value.
- */
- bool capped;
};
} //namespace internal
OpenPOWER on IntegriCloud