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>
2 files changed
tree: f0f9a1bd84561134dbbdcffc81fe534ab6f94bf4
  1. app-local-errors/
  2. callouts/
  3. org/
  4. phosphor-logging/
  5. test/
  6. tools/
  7. xyz/
  8. .gitignore
  9. bootstrap.sh
  10. configure.ac
  11. elog.cpp
  12. elog_entry.cpp
  13. elog_entry.hpp
  14. elog_meta.cpp
  15. elog_meta.hpp
  16. elog_serialize.cpp
  17. elog_serialize.hpp
  18. LICENSE
  19. log_manager.cpp
  20. log_manager.hpp
  21. log_manager_main.cpp
  22. logging_test.cpp
  23. Makefile.am
  24. org.openbmc.Associations.cpp
  25. phosphor-logging.pc.in
  26. README.md
README.md

phosphor-logging

phosphor logging provides mechanism for common event and logging creation based on information from the journal log.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.

REST command to delete an error

curl -c cjar -k -X POST -H "Content-Type: application/json" \
-d '{"data": [ "root", "<root password>" ] }' https://<BMC IP>/login

curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST \
-d '{"data": []}' \
https://<BMC IP>/xyz/openbmc_project/logging/entry/<entry num>/action/Delete

REST command to delete all errors

curl -c cjar -k -X POST -H "Content-Type: application/json" \
-d '{"data": [ "root", "<root password>" ] }' https://<<BMC IP>/login

curl -c cjar -b cjar -k -H "Content-Type: application/json" \
-X POST https://<<BMC IP>/xyz/openbmc_project/logging/action/deleteAll \
-d "{\"data\": [] }"