summaryrefslogtreecommitdiffstats
path: root/logging_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* minor cleanup, std namespacingPatrick Venture2018-11-011-2/+3
| | | | | | | Added std namespace to places where there is a cpp version. Change-Id: I60a05a7c9cdcd79cfffc3c4968005fcbe34acf81 Signed-off-by: Patrick Venture <venture@google.com>
* add .clang-formatPatrick Venture2018-10-261-117/+107
| | | | | Change-Id: I2c36b7886a25d0b235693b0776019d29608e1d52 Signed-off-by: Patrick Venture <venture@google.com>
* Add/adjust tests for new commit and report methodsMarri Devender Rao2017-04-121-2/+8
| | | | | Change-Id: I49ac9574958f4870b04dedd91580c15825c6dd36 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Map sdbusplus exception to phosphor exceptionDeepak Kodihalli2017-03-151-5/+6
| | | | | | | | | | | | | Errors will be created by using the sdbusplus error types, which results in an sdbusplus exception being thrown. Error metadata can be verified at compile-time by checking the error against phosphor-logging error types. This commit maps the sdbusplus error type to the phosphor type, for this purpose, via template specializations. Change-Id: Iee37e2a3846cc3acf3a62270a520ff0c395fd36d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fix incorrect error namespaceDeepak Kodihalli2017-03-151-3/+3
| | | | | Change-Id: I65894c7acfa75f4601f43de2595e0f1fda89c0bb Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Error log inject toolMichael Tritz2017-03-151-1/+67
| | | | | | | | | This tool adds an option to the logging-test to inject an error as specified by command line. Change-Id: I1028bd3964db23ed5ffa50414f7a6cc2f880c40c Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Match error full name and namespaceDeepak Kodihalli2017-03-091-9/+9
| | | | | | | | | | Remove the addition of the extra "namespace Error" while generating error full names, as the error full name doesn't have the extra "Error". This extra namespace addition was being done to match up sdbusplus error binding generation, but this will have to be re-looked at. Change-Id: Ib99ce8e3a09dd76a23b8cc6fe7e706551a1699d6 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Include namespaces in the phosphor-logging exception nameAdriana Kobylak2017-03-021-17/+16
| | | | | | | | | | | | | | | | | Currently the phosphor-logging exception name is for example Device for an error file located in xyz/openbmc_project/Error/Callout/. It should instead be named xyz.openbmc_project.Error.Callout.Device following the naming structure of the sdbusplus++ tool to differentiate it from other Device error exceptions. With the full name, the namespaces can be determined, so there's no need to pass the namespace parameter to the template that generates the elog-errors.hpp. As with the name, follow the namespace structure of the sdbusplus exception object. Closes openbmc/phosphor-logging#2 Change-Id: I960d759d90aa18fd43211034ebd6009859113ee7 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Use configure option yaml path to generate elog-errors.hppAdriana Kobylak2017-03-011-1/+0
| | | | | | | | | | | | Add a config variable that can be passed via a recipe to point the parser to a directory where the error yaml files are. Rename elog-gen.hpp to elog-errors.hpp, which better matches the exception error log file names. Include elog-gen.hpp in elog.hpp so that callers that need to create and commit error logs only need to include one header file. Change-Id: Ie3cd65ac761c1f7b2c99c50a2273859283a5ab4b Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Moved log.hpp and elog.hpp to a folder under phosphor-loggingSaqib Khan2017-02-201-2/+2
| | | | | | | | | | Now these files are copied to a folder under phosphor-logging, other repositories will need to be fixed. I'm leaving the files in the base dir as well until I work on fixing all projects that utilizes log.hpp and elog.hpp Change-Id: Ie4640852727c1572325e974548737bc70a6db7c2 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
* Update test case to verify error inheritanceDeepak Kodihalli2017-01-271-4/+34
| | | | | | | Ensure inherited metadata shows up in the journal. Change-Id: I4b6c30e1439bf6a799fbb78d8e8eb6754141b568 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* elog-gen.py : implement error inheritanceDeepak Kodihalli2017-01-271-2/+11
| | | | | | | | | If an error inherits another error (via the error YAML interface), have the child error inherit parent's metadata. Only single inheritance is supported as of now. Change-Id: I9ff295f4db04a9c5389f66e04f5d28287f9628a9 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* elog-gen.py : read multiple error yaml filesDeepak Kodihalli2017-01-271-6/+6
| | | | | | | | | | | | | | | | This change enables the elog-gen script to look at more than one error yaml file (and corresponding metadata yaml file). The input to the script had to be changed to a yaml directory, containing error yaml files, instead of a single error yaml file. The reason to support reading multiple error yaml files is that, without this, applications have to all dump their errors in a single big error yaml file. Now it's possible to write application/domain specific error yaml files; they just need to be exported to the same location, from where elog-gen.py can pick them. Change-Id: I9418bf0e0b54a7b7f7701b337649cb8eb4c54913 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Base error log namespaces on yaml file pathAndrew Geissler2016-11-231-20/+20
| | | | | | | | | This is another step in the direction of getting us to support the error yaml file as it will be defined in the phosphor-dbus-interfaces repo. Change-Id: Ib437bea920f511bdbf541c3e2653bbf35a83fe92 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Update elog gen script to support the dbus specified errorsAndrew Geissler2016-11-181-18/+25
| | | | | | | | This work is in prep for running this python script against the errors defined in the phosphor-dbus-interfaces repo Change-Id: I85e6f612a5935391deaedc74aab06ca023c15703 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Build the required error log header file for elogsAndrew Geissler2016-11-081-24/+32
| | | | | | | | | | | | Take the elog.yaml file and generate the required hpp file required for build time validation and error log processing. A future commit will delete elog-gen.hpp and will start dynamically generating it during build. Change-Id: I21a87d959096a2541de69fde47f57f02482a00cc Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Add exception generation to error loggingAndrew Geissler2016-11-021-7/+20
| | | | | | | | | | | | This commit puts basic exception support into the elog class. All errors will generate an exception with this commit. This will most likely change over to using the dbus exception class as a base in the future but that change will be transperent to the users. Change-Id: Ibd02d4c204393a0cfb156805360161759cb6631e Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Add in test case which validates elog client interfaceAndrew Geissler2016-10-311-0/+130
Change-Id: I5c5f7a550a8f272251893ff616408c41d32281f9 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
OpenPOWER on IntegriCloud