Add rsyslog configuration

phosphor-sel-logger requires specific rsyslog configuration to work
correctly.  Install the configuration to make it easier for integrators
to deploy.

Change-Id: Ib917aff68691658d06d22718e239ced1a15d033d
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/meson.build b/meson.build
index ecea2be..db0cd05 100644
--- a/meson.build
+++ b/meson.build
@@ -54,3 +54,10 @@
         install_dir: systemd.get_variable('systemd_system_unit_dir'),
     )
 endif
+
+if not get_option('send-to-logger')
+    install_data(
+        'rsyslog/phosphor-sel-logger.conf',
+        install_dir: join_paths(get_option('sysconfdir'), 'rsyslog.d'),
+    )
+endif
diff --git a/rsyslog/phosphor-sel-logger.conf b/rsyslog/phosphor-sel-logger.conf
new file mode 100644
index 0000000..08102c5
--- /dev/null
+++ b/rsyslog/phosphor-sel-logger.conf
@@ -0,0 +1,20 @@
+template(name="IPMISELTemplate" type="list") {
+    property(name="timereported" dateFormat="rfc3339")
+    constant(value=" ")
+    property(name="$!IPMI_SEL_RECORD_ID")
+    constant(value=",")
+    property(name="$!IPMI_SEL_RECORD_TYPE")
+    constant(value=",")
+    property(name="$!IPMI_SEL_DATA")
+    constant(value=",")
+    property(name="$!IPMI_SEL_GENERATOR_ID")
+    constant(value=",")
+    property(name="$!IPMI_SEL_SENSOR_PATH")
+    constant(value=",")
+    property(name="$!IPMI_SEL_EVENT_DIR")
+    constant(value="\n")
+}
+
+if ($!MESSAGE_ID == "b370836ccf2f4850ac5bee185b77893a") then {
+   action(type="omfile" file="/var/log/ipmi_sel" template="IPMISELTemplate")
+}