diff --git a/tools/elog-gen.py b/tools/elog-gen.py
index 360ae11..0452489 100755
--- a/tools/elog-gen.py
+++ b/tools/elog-gen.py
@@ -56,17 +56,23 @@
     return True
 
 
+# Return the yaml files with their directory structure plus the file name
+# without the yaml extension, which will be used to set the namespaces.
+# Ex: file xyz/openbmc_project/Error/Callout/Device.errors.yaml
+# will have namespce xyz/openbmc_project/Error/Callout/Device
 def get_error_yaml_files(i_yaml_dir, i_test_dir):
     yaml_files = dict()
     if i_yaml_dir != "None":
         for root, dirs, files in os.walk(i_yaml_dir):
             for files in filter(lambda file:
                                 file.endswith('.errors.yaml'), files):
-                splitdir = root.split(i_yaml_dir)[1]
+                splitdir = root.split(i_yaml_dir)[1] + "/" + files[:-12]
+                if splitdir.startswith("/"):
+                    splitdir = splitdir[1:]
                 yaml_files[(os.path.join(root, files))] = splitdir
     for root, dirs, files in os.walk(i_test_dir):
         for files in filter(lambda file: file.endswith('.errors.yaml'), files):
-            splitdir = root.split(i_test_dir)[1]
+            splitdir = root.split(i_test_dir)[1] + "/" + files[:-12]
             yaml_files[(os.path.join(root, files))] = splitdir
     return yaml_files
 
@@ -114,7 +120,6 @@
     meta = dict()  # The meta data names associated (ERRNO, FILE_NAME, ...)
     meta_data = dict()  # The meta data info (type, format)
     parents = dict()
-    namespace = dict()
 
     error_yamls = get_error_yaml_files(i_yaml_dir, i_test_dir)
 
@@ -145,8 +150,7 @@
                        error_lvl,
                        meta,
                        meta_data,
-                       parents,
-                       namespace))
+                       parents))
 
     if(not check_error_inheritance(errors, parents)):
         print("Error - failed to validate error inheritance")
@@ -162,7 +166,7 @@
     f.write(template.render(
             errors=errors, error_msg=error_msg,
             error_lvl=error_lvl, meta=meta,
-            meta_data=meta_data, error_namespace=namespace,
+            meta_data=meta_data,
             parents=parents))
     f.close()
 
@@ -181,8 +185,7 @@
     i_namespace                 namespace data
     o_elog_data                 error metadata
     """
-    errors, error_msg, error_lvl, meta, meta_data, parents, namespace = \
-        o_elog_data
+    errors, error_msg, error_lvl, meta, meta_data, parents = o_elog_data
     ifile = yaml.safe_load(open(i_elog_yaml))
     mfile = yaml.safe_load(open(i_elog_meta_yaml))
     for i in mfile:
@@ -196,19 +199,19 @@
             print("Error - Did not find meta data for " + i['name'])
             exit(1)
         # Grab the main error and it's info
-        errors.append(i['name'])
+        fullname = i_namespace.replace('/', '.') + ('.') + i['name']
+        errors.append(fullname)
         parent = None
         if('inherits' in i):
-            # xyz.openbmc.Foo, we need Foo
             # Get 0th inherited error (current support - single inheritance)
-            parent = i['inherits'][0].split(".").pop()
-        parents[i['name']] = parent
-        error_msg[i['name']] = match['description']
+            parent = i['inherits'][0]
+        parents[fullname] = parent
+        error_msg[fullname] = match['description']
         try:
-            error_lvl[i['name']] = i['level']
+            error_lvl[fullname] = i['level']
         except:
             print ("No level found for: " + i['name'] + ", using INFO")
-            error_lvl[i['name']] = "INFO"
+            error_lvl[fullname] = "INFO"
         tmp_meta = []
         # grab all the meta data fields and info
         for j in i['meta']:
@@ -218,8 +221,7 @@
             meta_data[str_short]['str'] = j['str']
             meta_data[str_short]['str_short'] = str_short
             meta_data[str_short]['type'] = get_cpp_type(j['type'])
-        meta[i['name']] = tmp_meta
-        namespace[i['name']] = i_namespace
+        meta[fullname] = tmp_meta
 
     # Debug
     # for i in errors:
