summaryrefslogtreecommitdiffstats
path: root/tools/phosphor-logging
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2016-11-21 15:16:45 -0600
committerAndrew Geissler <andrewg@us.ibm.com>2016-11-23 06:15:52 -0600
commitf1f2cfa943d08f270976e42e1f386fd34e723003 (patch)
tree0d6522636278e9e985ea83e63b4d13f54e5a5a7f /tools/phosphor-logging
parent33ff62a2186f517988b66d1a77aee413904ef2ce (diff)
downloadphosphor-logging-f1f2cfa943d08f270976e42e1f386fd34e723003.tar.gz
phosphor-logging-f1f2cfa943d08f270976e42e1f386fd34e723003.zip
Base error log namespaces on yaml file path
This is another step in the direction of getting us to support the error yaml file as it will be defined in the phosphor-dbus-interfaces repo. Change-Id: Ib437bea920f511bdbf541c3e2653bbf35a83fe92 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'tools/phosphor-logging')
-rw-r--r--tools/phosphor-logging/templates/elog-gen-template.mako.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/phosphor-logging/templates/elog-gen-template.mako.hpp b/tools/phosphor-logging/templates/elog-gen-template.mako.hpp
index cb7137d..b9d3d5e 100644
--- a/tools/phosphor-logging/templates/elog-gen-template.mako.hpp
+++ b/tools/phosphor-logging/templates/elog-gen-template.mako.hpp
@@ -16,14 +16,16 @@ namespace logging
% for a in errors:
<%
- namespaces = errors[a].split('.')
- classname = namespaces.pop()
+ namespaces = elog_yaml.split('/')
+ namespaces.pop()
+ classname = errors[a]
%>\
% for s in namespaces:
namespace ${s}
{
% endfor
-
+namespace Error
+{
namespace _${classname}
{
% for b in meta[a]:
@@ -49,7 +51,7 @@ struct ${classname}
% endfor
using metadata_types = std::tuple<${meta_string}>;
};
-
+} // namespace Error
% for s in reversed(namespaces):
} // namespace ${s}
% endfor
OpenPOWER on IntegriCloud