Entry ctor: accept associations
Pass a list of associations to the Entry ctor. This enables to create
associations between the error object and other objects, if such
associations exist.
Change-Id: I88a517efc0ead0a62b2e6558822d94b8fc1c6070
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/log_manager.cpp b/log_manager.cpp
index 3401e82..b094c0e 100644
--- a/log_manager.cpp
+++ b/log_manager.cpp
@@ -127,6 +127,7 @@
std::chrono::system_clock::now().time_since_epoch()).count();
auto objPath = std::string(OBJ_ENTRY) + '/' +
std::to_string(entryId);
+ AssociationList objects {};
entries.insert(std::make_pair(entryId, std::make_unique<Entry>(
busLog,
objPath,
@@ -134,7 +135,8 @@
ms, // Milliseconds since 1970
(Entry::Level)g_errLevelMap[errMsg],
std::move(errMsg),
- std::move(additionalData))));
+ std::move(additionalData),
+ std::move(objects))));
return;
}