dreport: Added elog plugin

Plugin used for collecting only user initialized
elog ID details.

Change-Id: I62d6e2bc289b739cbb165e85caafe4b584fa626c
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/tools/dreport.d/plugins.d/elog b/tools/dreport.d/plugins.d/elog
new file mode 100644
index 0000000..5bd956a
--- /dev/null
+++ b/tools/dreport.d/plugins.d/elog
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# config: 3 20
+# @brief: Collect only user initialized elog ID details.
+#
+
+. $DREPORT_INCLUDE/functions
+
+if [ -z $elog_id ]; then
+    log_error "elog does not exist"
+    exit
+fi
+
+desc="elog id:$elog_id"
+file_name="elog-$elog_id.log"
+command="busctl --verbose --no-pager \
+                  call xyz.openbmc_project.Logging \
+                  $optional_path \
+                  org.freedesktop.DBus.Properties GetAll s \
+                  xyz.openbmc_project.Logging.Entry"
+
+add_cmd_output "$command" "$file_name" "$desc"