mirror of https://github.com/containers/podman.git
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 <pholzing@redhat.com>
This commit is contained in:
parent
d7b72f4368
commit
13c2aca219
|
@ -1387,10 +1387,8 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p
|
||||||
logLevel := logrus.GetLevel()
|
logLevel := logrus.GetLevel()
|
||||||
args = append(args, "--log-level", logLevel.String())
|
args = append(args, "--log-level", logLevel.String())
|
||||||
|
|
||||||
if logLevel == logrus.DebugLevel {
|
logrus.Debugf("%s messages will be logged to syslog", r.conmonPath)
|
||||||
logrus.Debugf("%s messages will be logged to syslog", r.conmonPath)
|
args = append(args, "--syslog")
|
||||||
args = append(args, "--syslog")
|
|
||||||
}
|
|
||||||
|
|
||||||
size := r.logSizeMax
|
size := r.logSizeMax
|
||||||
if ctr.config.LogSize > 0 {
|
if ctr.config.LogSize > 0 {
|
||||||
|
|
Loading…
Reference in New Issue