syslog: support not using syslog
This commit is contained in:
parent
27cc67d2cf
commit
fb11c0c27c
|
@ -143,10 +143,12 @@ func Setup(opts *Options) error {
|
||||||
|
|
||||||
log.p = priority
|
log.p = priority
|
||||||
|
|
||||||
var err error
|
if opts.WriteSyslog {
|
||||||
log.l, err = gsyslog.NewLogger(priority, opts.Facility, opts.Tag)
|
var err error
|
||||||
if err != nil {
|
log.l, err = gsyslog.NewLogger(priority, opts.Facility, opts.Tag)
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue