diff --git a/main.go b/main.go index a69653a9..a2894b5e 100644 --- a/main.go +++ b/main.go @@ -23,9 +23,11 @@ var config struct { UDPTimeout time.Duration } +var logger = log.New(os.Stderr, "", log.Lshortfile|log.LstdFlags) + func logf(f string, v ...interface{}) { if config.Verbose { - log.Printf(f, v...) + logger.Output(2, fmt.Sprintf(f, v...)) } }