summaryrefslogtreecommitdiffstats
path: root/src/elog.hpp
Commit message (Collapse)AuthorAgeFilesLines
* update .clang-formatPatrick Venture2018-09-041-7/+13
| | | | | | | | Added the header inclusion order to the .clang-format file generated these changes. Change-Id: I4f51a20f469de431ee6a5ba78e3f4da39c980fab Signed-off-by: Patrick Venture <venture@google.com>
* Fix callback unit test failureMarri Devender Rao2018-06-051-0/+6
| | | | | | | | | | | | | | Recently changes has been done in phosphor-logging commit method causing the unit test failure with error message "Error in mapper call". Earlier commit method used to return error but the same has been modified to throw exception now. Fixed to return from the callback method if context is start Change-Id: I606c638bd2d0bc2003af0b284586e53809bbca21 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Enable clang-formatBrad Bishop2018-03-291-103/+93
| | | | | | | Fix up errors and enable clang-format during CI builds. Change-Id: I4176b81f8b85a287af9354165e09ff66aeb9fb29 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add constants for tuple fieldsMatt Spinler2018-02-271-6/+7
| | | | | | | | | Add constants for use with std::get. Tested: Run unit tests Change-Id: Ic09c13feeda69d61c98f63d227cae8f08d1bf50e Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add ElogWithMetaDataCapture classMatt Spinler2018-02-271-0/+116
| | | | | | | | | | | | | | | This callback class will create an error log with exactly 1 metadata field, which takes a string. This metadata field will be filled in with the property paths, names, and values of the properties that passed the condition checks that caused the callback to be called in the first place. Tested: Ran with YAML rules that used this callback and checked that everything worked as specified. Change-Id: Ib37206c63385939c583a09e7ba979d6e016691f6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Add callback contextsRatan Gupta2018-02-221-1/+1
| | | | | | | | | | | | | | | | | Add the notion of a callback context. This enables callbacks to have logic around the conditions they were invoked in. There are two context on which call back can be invoked 1) Startup: during startup all the call backs will be called 2) Signal: As part of condition match on the watched properties. Callback would behave differently based on the context. eg: eventCallback 1) Startup: Don't take any action. 2) Signal: Create the Dbus Object for the event. Change-Id: If455558798ac3e44bbd8a93de0ce1b09d2e308ae Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add support for metadataGunnar Mills2017-08-211-7/+45
| | | | | | | | Added support for metadata in elog.hpp, elog mako file, and pdmgen. This metadata will be added with the error log. Change-Id: Iaf0fe24d71f6bdd02b51df208b2c1d66c68319d3 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Create new Elog classGunnar Mills2017-08-211-0/+69
Created new Elog callback, which will create an error log. This is just the base, more to come. Change-Id: I50c12c8bff0942b5cb027e38d0cc8691e8a241b4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
OpenPOWER on IntegriCloud