diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2017-02-19 13:56:41 -0600 |
---|---|---|
committer | Adriana Kobylak <anoo@us.ibm.com> | 2017-02-28 10:47:37 -0600 |
commit | 8c3857c9297c89e1fead89859815a1c4261fdec0 (patch) | |
tree | e9507c1782f4101855f4b5bd694fab4fdfb3aa96 /tools | |
parent | 371a38b7b6e8ea8ffce2d4bf245445c6cd0f5c4e (diff) | |
download | phosphor-logging-8c3857c9297c89e1fead89859815a1c4261fdec0.tar.gz phosphor-logging-8c3857c9297c89e1fead89859815a1c4261fdec0.zip |
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>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/elog-gen.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/elog-gen.py b/tools/elog-gen.py index 6ca8455..1a79139 100755 --- a/tools/elog-gen.py +++ b/tools/elog-gen.py @@ -204,7 +204,11 @@ def get_elog_data(i_elog_yaml, parent = i['inherits'][0].split(".").pop() parents[i['name']] = parent error_msg[i['name']] = match['description'] - error_lvl[i['name']] = i['level'] + try: + error_lvl[i['name']] = i['level'] + except: + print ("No level found for: " + i['name'] + ", using INFO") + error_lvl[i['name']] = "INFO" tmp_meta = [] # grab all the meta data fields and info for j in i['meta']: |