From 501643c8bde591fcb8e4c42564f1b854128ad2f7 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 19 Nov 2021 18:15:53 +0100 Subject: Make sure netavark output is logged to the syslog Create a custom writer which logs the netavark output to logrus. This will log to the syslog when it is enabled. Signed-off-by: Paul Holzinger --- libpod/options.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libpod/options.go') diff --git a/libpod/options.go b/libpod/options.go index 3f0f9fbe0..8f2d5cb15 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -578,6 +578,14 @@ func WithEnableSDNotify() RuntimeOption { } } +// WithSyslog sets a runtime option so we know that we have to log to the syslog as well +func WithSyslog() RuntimeOption { + return func(rt *Runtime) error { + rt.syslog = true + return nil + } +} + // WithRuntimeFlags adds the global runtime flags to the container config func WithRuntimeFlags(runtimeFlags []string) RuntimeOption { return func(rt *Runtime) error { -- cgit v1.2.3-54-g00ecf