History log of /openbmc/phosphor-logging/tools/elog-gen.py (Results 1 – 25 of 35)
Revision Date Author Comments
# d27675d7 08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

black: re-format

black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.

Change-Id: I8b1542d2681ef39

black: re-format

black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.

Change-Id: I8b1542d2681ef3985455920fa939a6ea2482be22
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# e6555f5b 04-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

format: reformat with black

CI seems to be failing due to a new version of pycodestyle
with errors such as:

```
./tools/elog-gen.py:26:11: E275 missing whitespace after keyword
if(i_parents

format: reformat with black

CI seems to be failing due to a new version of pycodestyle
with errors such as:

```
./tools/elog-gen.py:26:11: E275 missing whitespace after keyword
if(i_parents[error] is not None):
```

Attempt to reformat the whole codebase with `black`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2fb63670cf4828d4dee19a9c7f247e9ffecdb398

show more ...


# 50654a83 16-Nov-2021 Matt Spinler <spinler@us.ibm.com>

elog-gen.py: Remove missing metadata print

It's fairly common now for errors defined in the errors.yaml files to
not have a corresponding entry in their metadata.yaml file, so this
c

elog-gen.py: Remove missing metadata print

It's fairly common now for errors defined in the errors.yaml files to
not have a corresponding entry in their metadata.yaml file, so this
commit removes the print statement complaining about that case because
it can mislead people into thinking there is a real problem.

The intent of the original design was to at least define the error level
(i.e. severity) in the metadata file, though since the script already
defaults that to 'ERR' it isn't really necessary.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iec7ece2382becc101fff6a03f38a3607fa2e43af

show more ...


# 7dc8c3be 17-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

elog-gen: handle missing YAML without crashing

The code to build the mako template path was buried inside a
for-loop, which ran against every found YAML file (redundantly).
If, for s

elog-gen: handle missing YAML without crashing

The code to build the mako template path was buried inside a
for-loop, which ran against every found YAML file (redundantly).
If, for some reason, the script is configured where the error
YAML is missing, the for-loop never runs and we end up with a
Python crash:

File "../tools/elog-gen.py", line 167, in gen_elog_hpp
template = Template(filename=template_path)
UnboundLocalError: local variable 'template_path' referenced
before assignment

Pull the template path code out of the for loop to better handle
this case.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic3dd4e8d9c7a9a9ed4fa382b879ecdc4b1b04838

show more ...


# bb6af860 16-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

python: enable code formatting

Enable code formatting in CI by creating a dummy Python 'setup.cfg'
and fix up the minor errors reported.

Signed-off-by: Patrick Williams <patrick

python: enable code formatting

Enable code formatting in CI by creating a dummy Python 'setup.cfg'
and fix up the minor errors reported.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9ddaa263f7407c42fb4f58d478bd2efb1d2fe026

show more ...


# c5e3e5e5 16-Apr-2021 Patrick Williams <patrick@stwcx.xyz>

elog-gen: handle empty template directories

In some cases, such as when building with meson, it is not useful
to separate the template directory for the template file when
invoking e

elog-gen: handle empty template directories

In some cases, such as when building with meson, it is not useful
to separate the template directory for the template file when
invoking elog-gen. Modify the template path handling code slightly
so that an empty template directory can be used with the template
file having the full path.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I26cae0f4af2fd03dfd194d593f40e9dedea9d012

show more ...


# cea3f89b 03-Dec-2020 Lei YU <yulei.sh@bytedance.com>

elog-gen: Support more types

Support boolean, int8, uint8 types.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I4e16b80788994e07050ce1e2bdb3ea8eeb7666a3


# d9c2fea7 05-Mar-2020 Matt Spinler <spinler@us.ibm.com>

Update elog-gen.py for python3

2to3 suggested this change as a better, though not strictly necessary,
way to do things.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Chan

Update elog-gen.py for python3

2to3 suggested this change as a better, though not strictly necessary,
way to do things.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2147d5a6e334f25d5a57250584eb0c77e88526a3

show more ...


# b17e8768 04-Oct-2018 William A. Kennington III <wak@google.com>

tools/elog-gen: Clean up missing error metadata message

Change-Id: I880cf6793e64db29a6eee74839f5a5bdabb1dff2
Signed-off-by: William A. Kennington III <wak@google.com>


# 80aa4762 18-Jul-2018 Lei YU <mine260309@gmail.com>

elog-gen: allow inherits from errors without meta

Previously, elog-gen only support inherits from errors that have meta,
and if we inherit from an error without meta, e.g.
Common.Int

elog-gen: allow inherits from errors without meta

Previously, elog-gen only support inherits from errors that have meta,
and if we inherit from an error without meta, e.g.
Common.InternalFailure, we get build error like:

KeyError: 'xyz.openbmc_project.Common.InternalFailure'

This commit makes elog-gen to allow such case, so it is possible to
allow a base error without meta, and inheriting error with additional
error, e.g.

# In Common:
- name: NotAllowed ## No meta

# In Time:
- name: NotAllowed
inherits:
- xyz.openbmc_project.Common.NotAllowed
meta:
- str: "OWNER=%s"
type: string
- str: "SYNC_METHOD=%s"
type: string

Note: the "inherit" here does not mean the the error inherits from
base errors in c++ class, it just makes error "logically" inherits base
errors. And in future commits we could make it "really" inherits base
errors in c++ level.

Tested: Verify phosphor-logging builds correctly with above example
error interfaces, and service is able to use such errors with
elog.

Change-Id: I8dccd7112881e3eb77a8f6ec62a532062348d2ef
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# deae3cac 25-Oct-2017 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: Idea8f76487125a7c7334b415a369c73d9fac40c4
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 4952aa6b 03-Jun-2017 Patrick Williams <patrick@stwcx.xyz>

elog-gen: python3 fixes for print

In python3 print requires () wrapping around parameters.

Change-Id: I830ef0d0e8c9e42c1157b708153bf96599346977
Signed-off-by: Patrick Williams <

elog-gen: python3 fixes for print

In python3 print requires () wrapping around parameters.

Change-Id: I830ef0d0e8c9e42c1157b708153bf96599346977
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# df7cb5c0 14-May-2017 Marri Devender Rao <devenrao@in.ibm.com>

Allow parsing of error yaml files without metadata yaml file

At present parser throws error if metadata yaml file is not found,
modified to not to return error.

Restruture the c

Allow parsing of error yaml files without metadata yaml file

At present parser throws error if metadata yaml file is not found,
modified to not to return error.

Restruture the code to loop through the entries in the error
yaml file rather than through the meta yaml file.

Change-Id: Iaae61690201aeffd8d9caa41515b29b7cc0b59a2
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>

show more ...


# 678d58b8 20-Apr-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

elog-gen.py : strip whitespaces

Strip trailing and leading whitespaces from the error description.

Resolves openbmc/openbmc#1481.

Change-Id: Ia223ab34746e64d87dacd1f23ade7e

elog-gen.py : strip whitespaces

Strip trailing and leading whitespaces from the error description.

Resolves openbmc/openbmc#1481.

Change-Id: Ia223ab34746e64d87dacd1f23ade7e4fc63ca9df
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 38f69744 28-Feb-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

elog-gen.py : consume metadata 'process' keyword

Add a new mako template to aid elog-gen.py to generate code for handling
the metadata 'process' keyword.

Change-Id: I720ac1e30cf

elog-gen.py : consume metadata 'process' keyword

Add a new mako template to aid elog-gen.py to generate code for handling
the metadata 'process' keyword.

Change-Id: I720ac1e30cf566f5a6bfe090faec6da9742f7423
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 7924b17e 08-Mar-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

elog-gen.py: handle absence of metadata

An error may just want to inherit metadata from another error, without
adding metadata of it's own. In such a case, the metadata file won't
ha

elog-gen.py: handle absence of metadata

An error may just want to inherit metadata from another error, without
adding metadata of it's own. In such a case, the metadata file won't
have the "meta" keyword, although it will have the "inherits" keyword.

Accept metadata files that don't have the "meta" keyword.

Change-Id: I4e30e035f19d6af8e0e1f654465d109fe5284a1b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 465aaecc 20-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

Include namespaces in the phosphor-logging exception name

Currently the phosphor-logging exception name is for example
Device for an error file located in xyz/openbmc_project/Error/Callo

Include namespaces in the phosphor-logging exception name

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>

show more ...


# ebd59fa4 06-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

Use configure option yaml path to generate elog-errors.hpp

Add a config variable that can be passed via a recipe to
point the parser to a directory where the error yaml files are.
Re

Use configure option yaml path to generate elog-errors.hpp

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>

show more ...


# 8c3857c9 19-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

elog-gen.py: Set INFO as default error log severity level

Some error yaml files in the phosphor-dbus-interfaces repo do not
specify the error log severity. Default this value to INFO.

elog-gen.py: Set INFO as default error log severity level

Some error yaml files in the phosphor-dbus-interfaces repo do not
specify the error log severity. Default this value to INFO.

Change-Id: Ifd335ba7d5e3e8238365036a2bfa7a199e014cfc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 371a38b7 19-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

elog-gen.py: Dynamically determine the namespaces

Namespaces should be determined by the directory tree where the
yaml files are located.

Change-Id: I82729728b6aebf4c48a0ec967f2

elog-gen.py: Dynamically determine the namespaces

Namespaces should be determined by the directory tree where the
yaml files are located.

Change-Id: I82729728b6aebf4c48a0ec967f2d08c1cbf8b7f3
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 6a9db6e4 21-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

elog-gen.py: Support base and test yaml directories

Add an additional argument to pass the directory where the unit
test yaml files are located. Default the base directory to None
as

elog-gen.py: Support base and test yaml directories

Add an additional argument to pass the directory where the unit
test yaml files are located. Default the base directory to None
as this argument will be passed by the recipe during build time.

Change-Id: I1276d74e383e1517595371c3f6e31fa077eac43f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# f4690738 19-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

elog-gen.py: Support subdirs

Add ability for elog-gen.py to find yaml files under subdirectories
so that yaml files found in Error/Callout/ and Error/IIC/ for
example can be found by

elog-gen.py: Support subdirs

Add ability for elog-gen.py to find yaml files under subdirectories
so that yaml files found in Error/Callout/ and Error/IIC/ for
example can be found by the caller just passing the Error/ directory.

Change-Id: I91dcd523d2a75deea6266a3ea6885b88cd788206
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 17944e13 13-Feb-2017 Adriana Kobylak <anoo@us.ibm.com>

Move inherits keyword from errors.yaml to metadata.yaml

The metadata.yaml file is the correct location for the inherits.
Update the elog-gen.py parser to support this change.

Ch

Move inherits keyword from errors.yaml to metadata.yaml

The metadata.yaml file is the correct location for the inherits.
Update the elog-gen.py parser to support this change.

Change-Id: Iac7f67ec72e761ab3dafbf89c7e4d5495b34f00d
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 6f299139 16-Feb-2017 Patrick Williams <patrick@stwcx.xyz>

elog-gen.py: python3 fixes

Change-Id: I4a96fe626c32e0c8078f8875da48eb06d63e763b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>


# f2462f0f 19-Jan-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

elog-gen.py : implement error inheritance

If an error inherits another error (via the error YAML interface), have
the child error inherit parent's metadata. Only single inheritance is

elog-gen.py : implement error inheritance

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>

show more ...


12