forked from External/grumble
Improved logging.
This commit is contained in:
parent
244027d41b
commit
b13dbeadf1
6 changed files with 82 additions and 6 deletions
10
grumble.go
10
grumble.go
|
|
@ -25,8 +25,16 @@ func main() {
|
|||
return
|
||||
}
|
||||
|
||||
err = LogTarget.OpenFile(Args.LogPath)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Unable to open log file: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
log.SetPrefix("[G] ")
|
||||
log.SetFlags(log.LstdFlags | log.Lmicroseconds)
|
||||
log.SetOutput(&LogTarget)
|
||||
|
||||
log.Printf("Grumble")
|
||||
|
||||
log.Printf("Using data directory: %s", Args.DataDir)
|
||||
|
|
@ -164,4 +172,4 @@ func main() {
|
|||
go SignalHandler()
|
||||
select {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue