systemd-journald: Don't store debug messages

Change the default log level from "debug" to "info" for
the messages that are stored on disk and forwarded to
syslog, so that debug messages don't fill up the journal
and more important ones are lost when the journal file
rotates.

Tested: Verified that debug messages such as the ipmi
"IPMI SET_SENSOR" ones are not printed anymore.

Change-Id: I20abb0b5dcd6606d3d6e843a7ad00ea58e2de2da
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb b/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb
index 930d447..9a9f2bc 100644
--- a/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb
+++ b/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb
@@ -7,11 +7,14 @@
 
 DEPENDS += "systemd"
 
-SRC_URI = "file://service-restart-policy.conf"
+SRC_URI += "file://service-restart-policy.conf"
+SRC_URI += "file://journald-maxlevel-policy.conf"
 
 FILES_${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
+FILES_${PN} += "${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf"
 
 
 do_install() {
         install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
+        install -m 644 -D ${WORKDIR}/journald-maxlevel-policy.conf ${D}${systemd_unitdir}/journald.conf.d/journald-maxlevel-policy.conf
 }
diff --git a/recipes-phosphor/systemd-policy/phosphor-systemd-policy/journald-maxlevel-policy.conf b/recipes-phosphor/systemd-policy/phosphor-systemd-policy/journald-maxlevel-policy.conf
new file mode 100644
index 0000000..f5f3d0f
--- /dev/null
+++ b/recipes-phosphor/systemd-policy/phosphor-systemd-policy/journald-maxlevel-policy.conf
@@ -0,0 +1,6 @@
+# Don't store "debug" messages, only "info" and below.
+# Reference: journald.conf(5)
+
+[Journal]
+MaxLevelStore=info
+MaxLevelSyslog=info