log: hook up chanbackup logger

This commit is contained in:
Olaoluwa Osuntokun 2019-02-08 19:39:38 -08:00
parent 9512d7036f
commit 056decac2a
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2

4
log.go
View File

@ -14,6 +14,7 @@ import (
"github.com/lightningnetwork/lnd/autopilot"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/chanbackup"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channelnotifier"
"github.com/lightningnetwork/lnd/contractcourt"
@ -83,6 +84,7 @@ var (
ntfrLog = build.NewSubLogger("NTFR", backendLog.Logger)
irpcLog = build.NewSubLogger("IRPC", backendLog.Logger)
chnfLog = build.NewSubLogger("CHNF", backendLog.Logger)
chbuLog = build.NewSubLogger("CHBU", backendLog.Logger)
)
// Initialize package-global logger variables.
@ -109,6 +111,7 @@ func init() {
chainrpc.UseLogger(ntfrLog)
invoicesrpc.UseLogger(irpcLog)
channelnotifier.UseLogger(chnfLog)
chanbackup.UseLogger(chbuLog)
addSubLogger(routerrpc.Subsystem, routerrpc.UseLogger)
}
@ -151,6 +154,7 @@ var subsystemLoggers = map[string]btclog.Logger{
"NTFR": ntfnLog,
"IRPC": irpcLog,
"CHNF": chnfLog,
"CHBU": chbuLog,
}
// initLogRotator initializes the logging rotator to write logs to logFile and