lnd: update logging interaction to latest API changes

This commit is contained in:
Olaoluwa Osuntokun 2017-07-06 14:36:55 -07:00
parent 4c3e24567e
commit 497b522c13
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

6
log.go

@ -110,14 +110,14 @@ func initLogRotator(logFile string) {
fmt.Fprintf(os.Stderr, "failed to create log directory: %v\n", err)
os.Exit(1)
}
pr, pw := io.Pipe()
r, err := rotator.New(pr, logFile, 10*1024, false, 3)
r, err := rotator.New(logFile, 10*1024, false, 3)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to create file rotator: %v\n", err)
os.Exit(1)
}
go r.Run()
pr, pw := io.Pipe()
go r.Run(pr)
logRotator = r
logRotatorPipe = pw