summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-11-19 18:15:53 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-11-19 18:15:53 +0100
commit501643c8bde591fcb8e4c42564f1b854128ad2f7 (patch)
tree741fc6b48d1d5fb5e9eeba2d314c06605a324c11 /libpod/options.go
parent671e5ee42d4eb71fc0238e8b0b1e4a68b1def156 (diff)
downloadpodman-501643c8bde591fcb8e4c42564f1b854128ad2f7.tar.gz
podman-501643c8bde591fcb8e4c42564f1b854128ad2f7.tar.bz2
podman-501643c8bde591fcb8e4c42564f1b854128ad2f7.zip
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 <pholzing@redhat.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go8
1 files changed, 8 insertions, 0 deletions
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 {