mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
log: wire up the new WalletKit logger
This commit is contained in:
parent
14ca3bb012
commit
844698048a
4
log.go
4
log.go
@ -20,6 +20,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/discovery"
|
||||
"github.com/lightningnetwork/lnd/htlcswitch"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
"github.com/lightningnetwork/lnd/routing"
|
||||
"github.com/lightningnetwork/lnd/signal"
|
||||
@ -67,6 +68,7 @@ var (
|
||||
sphxLog = build.NewSubLogger("SPHX", backendLog.Logger)
|
||||
swprLog = build.NewSubLogger("SWPR", backendLog.Logger)
|
||||
sgnrLog = build.NewSubLogger("SGNR", backendLog.Logger)
|
||||
wlktLog = build.NewSubLogger("WLKT", backendLog.Logger)
|
||||
)
|
||||
|
||||
// Initialize package-global logger variables.
|
||||
@ -85,6 +87,7 @@ func init() {
|
||||
signal.UseLogger(ltndLog)
|
||||
sweep.UseLogger(swprLog)
|
||||
signrpc.UseLogger(sgnrLog)
|
||||
walletrpc.UseLogger(wlktLog)
|
||||
}
|
||||
|
||||
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
||||
@ -109,6 +112,7 @@ var subsystemLoggers = map[string]btclog.Logger{
|
||||
"SPHX": sphxLog,
|
||||
"SWPR": swprLog,
|
||||
"SGNR": sgnrLog,
|
||||
"WLKT": wlktLog,
|
||||
}
|
||||
|
||||
// initLogRotator initializes the logging rotator to write logs to logFile and
|
||||
|
Loading…
Reference in New Issue
Block a user