1 ## Note that this file is not auto generated, it is what generates the
2 ## elog-lookup.cpp file
3 // This file was autogenerated.  Do not edit!
4 // See elog-gen.py for more details
5 #include <map>
6 #include <vector>
7 #include <log_manager.hpp>
8 #include <phosphor-logging/log.hpp>
9 
10 namespace phosphor
11 {
12 
13 namespace logging
14 {
15 
16 const std::map<std::string,std::vector<std::string>> g_errMetaMap = {
17     % for name in errors:
18 <%
19     meta_string = ""
20     meta_list = []
21     if(name in meta and meta[name]):
22         meta_list = meta[name]
23         meta_string = '\",\"'.join(meta_list)
24 
25     parent = parents[name]
26     while parent:
27         if (parent in meta and meta[parent]):
28             parent_meta_short = '\",\"'.join(meta[parent])
29             if (meta_string):
30                 meta_string = meta_string + "\",\"" + parent_meta_short
31             else:
32                 meta_string = parent_meta_short
33         parent = parents[parent]
34     if ("example.xyz.openbmc_project" not in name):
35         index = name.rfind('.')
36         name = name[:index] + ".Error" + name[index:]
37 %>\
38     %if (meta_string):
39     {"${name}",{"${meta_string}"}},
40     %else:
41     {"${name}",{}},
42     %endif
43     % endfor
44 };
45 
46 const std::map<std::string,level> g_errLevelMap = {
47     % for a in errors:
48 <%
49     name = a
50     if ("example.xyz.openbmc_project" not in name):
51         index = name.rfind('.')
52         name = name[:index] + ".Error" + name[index:]
53 %>\
54     {"${name}",level::${error_lvl[a]}},
55     % endfor
56 };
57 
58 } // namespace logging
59 
60 } // namespace phosphor
61