| ## Note that this file is not auto generated, it is what generates the |
| ## elog-lookup.cpp file |
| // This file was autogenerated. Do not edit! |
| // See elog-gen.py for more details |
| #include <map> |
| #include <vector> |
| #include <log_manager.hpp> |
| #include <phosphor-logging/log.hpp> |
| |
| namespace phosphor |
| { |
| |
| namespace logging |
| { |
| |
| const std::map<std::string,std::vector<std::string>> g_errMetaMap = { |
| % for name in errors: |
| <% |
| meta_list = [] |
| if(name in meta): |
| meta_list = meta[name] |
| meta_string = '\",\"'.join(meta_list) |
| |
| parent = parents[name] |
| while parent: |
| tmpparent = parent.split('.') |
| ## Name is the last item |
| parent_name = tmpparent[-1] |
| parent_meta_short = '\",\"'.join(meta[parent]) |
| meta_string = meta_string + "\",\"" + parent_meta_short |
| parent = parents[parent] |
| if ("example.xyz.openbmc_project" not in name): |
| index = name.rfind('.') |
| name = name[:index] + ".Error" + name[index:] |
| %>\ |
| {"${name}",{"${meta_string}"}}, |
| % endfor |
| }; |
| |
| const std::map<std::string,level> g_errLevelMap = { |
| % for a in errors: |
| <% |
| name = a |
| if ("example.xyz.openbmc_project" not in name): |
| index = name.rfind('.') |
| name = name[:index] + ".Error" + name[index:] |
| %>\ |
| {"${name}",level::${error_lvl[a]}}, |
| % endfor |
| }; |
| |
| } // namespace logging |
| |
| } // namespace phosphor |