From c9eddd22ebce7e139c2eda5c50525fa1ca8268de Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 27 Jun 2018 15:55:12 -0400 Subject: conmon no longer writes to syslog If the caller sets up the app to be in logrus.DebugLevel, then we will add the --syslog flag to conmon to get all of the messages. Signed-off-by: Daniel J Walsh Closes: #1014 Approved by: TomSweeneyRedHat --- libpod/oci.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpod') diff --git a/libpod/oci.go b/libpod/oci.go index c7672a04d..871069627 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -280,6 +280,12 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string) (er if r.noPivot { args = append(args, "--no-pivot") } + + if logrus.GetLevel() == logrus.DebugLevel { + logrus.Debug("%s messages will be logged to syslog", r.conmonPath) + args = append(args, "--syslog") + } + logrus.WithFields(logrus.Fields{ "args": args, }).Debugf("running conmon: %s", r.conmonPath) -- cgit v1.2.3-54-g00ecf