Skip to content

Commit

Permalink
Merge branch 'master' into minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Broer committed Oct 16, 2015
2 parents bc6698f + 67149ef commit d3e4dfb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ var (
var exitErr error

func init() {
log.SetFormatter(&log.TextFormatter{DisableTimestamp: true})
log.SetOutput(os.Stderr)
}

Expand Down Expand Up @@ -136,12 +135,15 @@ func main() {
}

if c.Bool("syslog") {
hook, err := logrus_syslog.NewSyslogHook("", "", syslog.LOG_LOCAL0|syslog.LOG_INFO, "go-dnsmasq")
log.SetFormatter(&log.TextFormatter{DisableTimestamp: true, DisableColors: true})
hook, err := logrus_syslog.NewSyslogHook("", "", syslog.LOG_DAEMON|syslog.LOG_INFO, "go-dnsmasq")
if err != nil {
log.Error("Unable to connect to local syslog daemon")
} else {
log.AddHook(hook)
}
} else {
log.SetFormatter(&log.TextFormatter{DisableTimestamp: true})
}

if ns := c.String("nameservers"); ns != "" {
Expand Down

0 comments on commit d3e4dfb

Please sign in to comment.