diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2017-06-13 06:03:07 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-27 14:11:36 +0000 |
commit | a2599cbf94da55e0103786a275c7349acef48af0 (patch) | |
tree | 518515c8f823aa291729f09592bec9ba2bff67a2 | |
parent | f1630eaa98da0fba6149d77f16ebbc4745b93e9c (diff) | |
download | phosphor-logging-a2599cbf94da55e0103786a275c7349acef48af0.tar.gz phosphor-logging-a2599cbf94da55e0103786a275c7349acef48af0.zip |
update README.md
Captured steps for generating application specific elog-errors.hpp
file.
Change-Id: I8fb7815f2fa86c52843b7eec6d562111d8179b7d
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
-rw-r--r-- | app-local-errors/README.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app-local-errors/README.md b/app-local-errors/README.md index 34334b3..835b1d5 100644 --- a/app-local-errors/README.md +++ b/app-local-errors/README.md @@ -36,13 +36,28 @@ copied to a known location before phosphor logging parses the error yaml files Refer to **phosphor-logging-error-logs-native.bbappend** at
https://github.com/openbmc/openbmc/blob/master/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/debug/
+###Generate application local elog-errors.hpp file
+Applications should be independently compilable so it cannot have a
+dependency on the elog-errors.hpp generated by phosphor-logging
+
+Generate application specific elog-errors.hpp using the elog-gen.py
+parser. In future the same will be generated through autotools.
+
+The application specific elog-errors.hpp is for the build purpose and the
+elog-errors.hpp from phosphor-logging will be used during elog commit/report
+
+#### Example
+python tools/elog-gen.py -y /home/OpenBmc/openpower-occ-control/ -u ./tools/ -t
+tools/phosphor-logging/templates/ -m elog-gen-template.mako.hpp -o
+elog-errors.hpp
+
### Reporting error
To report (commit) the error follow the below format
***report<sdbusplus::exception_t>(metadata)***
#### *example*
```
#include <xyz/openbmc_project/Software/Version/error.hpp>
-#include <phosphor-logging/elog-errors.hpp>
+#include "elog-errors.hpp" #Use application specific header file
using error =
sdbusplus::xyz::openbmc_project::Software::Version::Error::ManifestFileFailure;
|