From c3b3c9777177ca44fe288ce327c1f1dd9e20f187 Mon Sep 17 00:00:00 2001 From: Adriana Kobylak Date: Wed, 5 Dec 2018 16:17:16 -0600 Subject: 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. (From meta-phosphor rev: 3692b801b4f273905b87b6de2e61ba3839dae4f0) Change-Id: I84a88511ed2ff90d0b3c2a77ae968cddcff6899f Signed-off-by: Adriana Kobylak Signed-off-by: Brad Bishop --- .../recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb | 5 ++++- .../phosphor-systemd-policy/journald-maxlevel-policy.conf | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy/journald-maxlevel-policy.conf (limited to 'meta-phosphor/recipes-phosphor/systemd-policy') diff --git a/meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb b/meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb index 930d44777..9a9f2bc81 100644 --- a/meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb +++ b/meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb @@ -7,11 +7,14 @@ LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d71 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/meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy/journald-maxlevel-policy.conf b/meta-phosphor/recipes-phosphor/systemd-policy/phosphor-systemd-policy/journald-maxlevel-policy.conf new file mode 100644 index 000000000..f5f3d0ff1 --- /dev/null +++ b/meta-phosphor/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 -- cgit v1.2.3