From 13c2aca21937f34019405d61622159152a02865d Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 14 Jun 2023 13:45:22 +0200 Subject: [PATCH] libpod: make conmon always log to syslog Conmon very early dups the std streams with /dev/null, therefore all errors it reports go nowhere. When you run podman with debug level we set --syslog and we can see the error in the journal. This should be the default. We have a lot of weird failures in CI that could be caused by conmon and we have access to the journal in the cirrus tasks so that should make debugging much easier. Conmon still uses the same logging level as podman so it will not spam the journal and only log warning and errors by default. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger --- libpod/oci_conmon_common.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libpod/oci_conmon_common.go b/libpod/oci_conmon_common.go index f87866195d..2393ff9204 100644 --- a/libpod/oci_conmon_common.go +++ b/libpod/oci_conmon_common.go @@ -1387,10 +1387,8 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p logLevel := logrus.GetLevel() args = append(args, "--log-level", logLevel.String()) - if logLevel == logrus.DebugLevel { - logrus.Debugf("%s messages will be logged to syslog", r.conmonPath) - args = append(args, "--syslog") - } + logrus.Debugf("%s messages will be logged to syslog", r.conmonPath) + args = append(args, "--syslog") size := r.logSizeMax if ctr.config.LogSize > 0 {