diff --git a/manager.cpp b/manager.cpp
index 94b4af1..c01cdc5 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -72,6 +72,7 @@
 
 void Manager::erase(EntryID id)
 {
+    childEntries.erase(id);
     entries.erase(id);
 }
 
@@ -93,6 +94,40 @@
     }
 }
 
+void Manager::addChildInterface(const std::string& objectPath,
+                                InterfaceType type,
+                                std::experimental::any& object)
+{
+    auto id = getEntryID(objectPath);
+    auto entry = childEntries.find(id);
+
+    // childEntries is:
+    // A map of error log entry IDs to:
+    //  a map of interface types to:
+    //    a vector of interface objects
+
+    if (entry == childEntries.end())
+    {
+        ObjectList objects{object};
+        InterfaceMapMulti interfaces;
+        interfaces.emplace(type, std::move(objects));
+        childEntries.emplace(id, std::move(interfaces));
+    }
+    else
+    {
+        auto i = entry->second.find(type);
+        if (i == entry->second.end())
+        {
+            ObjectList objects{objects};
+            entry->second.emplace(type, objects);
+        }
+        else
+        {
+            i->second.emplace_back(object);
+        }
+    }
+}
+
 #ifdef USE_POLICY_INTERFACE
 void Manager::createPolicyInterface(const std::string& objectPath,
                                     const DbusPropertyMap& properties)
diff --git a/manager.hpp b/manager.hpp
index b3891ac..0412130 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -47,6 +47,10 @@
     using InterfaceMap = std::map<InterfaceType, std::experimental::any>;
     using EntryMap = std::map<EntryID, InterfaceMap>;
 
+    using ObjectList = std::vector<std::experimental::any>;
+    using InterfaceMapMulti = std::map<InterfaceType, ObjectList>;
+    using EntryMapMulti = std::map<EntryID, InterfaceMapMulti>;
+
     /**
      * Deletes the entry and any child entries with
      * the specified ID.
@@ -128,6 +132,21 @@
                       std::experimental::any& object);
 
     /**
+     * Adds an interface to a child object, which is an object that
+     * relates to the main ...logging/entry/X object but has a different path.
+     * The object is stored in the childEntries map.
+     *
+     * There can be multiple instances of a child object per type per
+     * logging object.
+     *
+     * @param[in] objectPath - the object path of the log
+     * @param[in] type - the interface type being added.
+     * @param[in] object - the interface object
+     */
+    void addChildInterface(const std::string& objectPath, InterfaceType type,
+                           std::experimental::any& object);
+
+    /**
      * The sdbusplus bus object
      */
     sdbusplus::bus::bus& bus;
@@ -148,6 +167,17 @@
      */
     EntryMap entries;
 
+    /**
+     * A map of the error log IDs to their interface objects which
+     * are children of the logging objects.
+     *
+     * These objects have the same lifespan as their parent objects.
+     *
+     * There may be multiple interfaces per ID, and also multiple
+     * interface instances per interface type.
+     */
+    EntryMapMulti childEntries;
+
 #ifdef USE_POLICY_INTERFACE
     /**
      * The class the wraps the IBM error logging policy table.
