config: add ChainRPC config

This commit is contained in:
Wilmer Paulino
2018-12-10 18:34:36 -08:00
parent 3d91aa2312
commit 59e2be5306
2 changed files with 23 additions and 1 deletions

5
log.go
View File

@ -10,7 +10,6 @@ import (
"github.com/btcsuite/btclog"
"github.com/jrick/logrotate/rotator"
"github.com/lightninglabs/neutrino"
"github.com/lightningnetwork/lightning-onion"
"github.com/lightningnetwork/lnd/autopilot"
"github.com/lightningnetwork/lnd/build"
@ -21,6 +20,7 @@ import (
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/invoices"
"github.com/lightningnetwork/lnd/lnrpc/autopilotrpc"
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
"github.com/lightningnetwork/lnd/lnwallet"
@ -77,6 +77,7 @@ var (
invcLog = build.NewSubLogger("INVC", backendLog.Logger)
nannLog = build.NewSubLogger("NANN", backendLog.Logger)
wtwrLog = build.NewSubLogger("WTWR", backendLog.Logger)
ntfrLog = build.NewSubLogger("NTFR", backendLog.Logger)
)
// Initialize package-global logger variables.
@ -100,6 +101,7 @@ func init() {
invoices.UseLogger(invcLog)
netann.UseLogger(nannLog)
watchtower.UseLogger(wtwrLog)
chainrpc.UseLogger(ntfrLog)
}
// subsystemLoggers maps each subsystem identifier to its associated logger.
@ -129,6 +131,7 @@ var subsystemLoggers = map[string]btclog.Logger{
"INVC": invcLog,
"NANN": nannLog,
"WTWR": wtwrLog,
"NTFR": ntfnLog,
}
// initLogRotator initializes the logging rotator to write logs to logFile and