Add ability to disable device logging

Drive logic is too complicated, so it'll be handled
in a different daemon, add ability to disable logging
in EM.

Tested: No more logs

Change-Id: I55bd66df1eda9434b9ad9f98fd576d2073db0227
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/EntityManager.hpp b/include/EntityManager.hpp
index 524fa5d..1b247d5 100644
--- a/include/EntityManager.hpp
+++ b/include/EntityManager.hpp
@@ -68,6 +68,10 @@
 inline void logDeviceAdded(const nlohmann::json& record)
 {
 
+    if (!deviceHasLogging(record))
+    {
+        return;
+    }
     auto findType = record.find("Type");
     auto findAsset =
         record.find("xyz.openbmc_project.Inventory.Decorator.Asset");
@@ -110,6 +114,10 @@
 
 inline void logDeviceRemoved(const nlohmann::json& record)
 {
+    if (!deviceHasLogging(record))
+    {
+        return;
+    }
     auto findType = record.find("Type");
     auto findAsset =
         record.find("xyz.openbmc_project.Inventory.Decorator.Asset");