syslog: support not using syslog

This commit is contained in:
Kyle Isom 2023-05-06 00:57:42 -07:00
parent 27cc67d2cf
commit fb11c0c27c
1 changed files with 6 additions and 4 deletions

View File

@ -143,11 +143,13 @@ func Setup(opts *Options) error {
log.p = priority log.p = priority
if opts.WriteSyslog {
var err error var err error
log.l, err = gsyslog.NewLogger(priority, opts.Facility, opts.Tag) log.l, err = gsyslog.NewLogger(priority, opts.Facility, opts.Tag)
if err != nil { if err != nil {
return err return err
} }
}
return nil return nil
} }