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_list = []
20     if(name in meta):
21         meta_list = meta[name]
22     meta_string = '\",\"'.join(meta_list)
23 
24     parent = parents[name]
25     while parent:
26         tmpparent = parent.split('.')
27         ## Name is the last item
28         parent_name = tmpparent[-1]
29         parent_meta_short = '\",\"'.join(meta[parent])
30         meta_string = meta_string + "\",\"" + parent_meta_short
31         parent = parents[parent]
32     if ("example.xyz.openbmc_project" not in name):
33         index = name.rfind('.')
34         name = name[:index] + ".Error" + name[index:]
35 %>\
36     {"${name}",{"${meta_string}"}},
37     % endfor
38 };
39 
40 const std::map<std::string,level> g_errLevelMap = {
41     % for a in errors:
42 <%
43     name = a
44     if ("example.xyz.openbmc_project" not in name):
45         index = name.rfind('.')
46         name = name[:index] + ".Error" + name[index:]
47 %>\
48     {"${name}",level::${error_lvl[a]}},
49     % endfor
50 };
51 
52 } // namespace logging
53 
54 } // namespace phosphor
55