summaryrefslogtreecommitdiffstats
path: root/log_manager.hpp
diff options
context:
space:
mode:
authorMarri Devender Rao <devenrao@in.ibm.com>2017-08-06 05:42:52 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-08-16 21:09:34 +0000
commit7656fba39d7bef754ee38a1d9a7889e7d3309db4 (patch)
treedfe0e5619204b3674d57bd1f0a4691967b877c13 /log_manager.hpp
parentcfd9a7dd2c3c17f38f71357a5abdbf3516318242 (diff)
downloadphosphor-logging-7656fba39d7bef754ee38a1d9a7889e7d3309db4.tar.gz
phosphor-logging-7656fba39d7bef754ee38a1d9a7889e7d3309db4.zip
Implement a cap on the number of committed errors
Resolves openbmc/openbmc#1617 Change-Id: I5850e5addb723e6f5102eb4677bb365285c1a633 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'log_manager.hpp')
-rw-r--r--log_manager.hpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/log_manager.hpp b/log_manager.hpp
index 730f63e..f366684 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -46,7 +46,8 @@ 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) {};
+ entryId(0),
+ capped(false) {};
/*
* @fn commit()
@@ -91,6 +92,16 @@ class Manager : public details::ServerObject<details::ManagerIface>
/** @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 logging
OpenPOWER on IntegriCloud