diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2019-08-13 10:24:53 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2019-08-13 10:24:53 -0500 |
commit | 52a4980c5024e8a812e4c69942a4aeb315904870 (patch) | |
tree | bb53187846012caf1a0c7d1e3f196a3dc65a6ae8 /tools | |
parent | 19fe323b6a36950af43058694e91457cc64dd709 (diff) | |
download | phosphor-logging-52a4980c5024e8a812e4c69942a4aeb315904870.tar.gz phosphor-logging-52a4980c5024e8a812e4c69942a4aeb315904870.zip |
Empty set for no elog lookup meta data
Create an empty set when there is no elog lookup meta data instead of
defaulting to add a single empty string entry.
Tested:
Built image and verified empty string no longer in errors where no
meta data is defined.
Change-Id: I7bf1ff2ab18f174d4cfa78cf22eeac4918033148
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/phosphor-logging/templates/elog-lookup-template.mako.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp b/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp index c9361d8..2e5c785 100644 --- a/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp +++ b/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp @@ -35,7 +35,11 @@ const std::map<std::string,std::vector<std::string>> g_errMetaMap = { index = name.rfind('.') name = name[:index] + ".Error" + name[index:] %>\ + %if (meta_string): {"${name}",{"${meta_string}"}}, + %else: + {"${name}",{}}, + %endif % endfor }; |