Skip to content

Commit

Permalink
Merge pull request #19179 from Luap99/syslog
Browse files Browse the repository at this point in the history
make --syslog errors non fatal
  • Loading branch information
openshift-merge-robot authored Jul 10, 2023
2 parents 79d3453 + 3f8ee70 commit 8c071ca
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cmd/podman/syslog_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
package main

import (
"fmt"
"log/syslog"
"os"

"github.com/sirupsen/logrus"
logrusSyslog "github.com/sirupsen/logrus/hooks/syslog"
Expand All @@ -19,10 +17,8 @@ func syslogHook() {

hook, err := logrusSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "")
if err != nil {
fmt.Fprint(os.Stderr, "Failed to initialize syslog hook: "+err.Error())
os.Exit(1)
}
if err == nil {
logrus.Debug("Failed to initialize syslog hook: " + err.Error())
} else {
logrus.AddHook(hook)
}
}

0 comments on commit 8c071ca

Please sign in to comment.