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/discovery"
|
||||||
"github.com/lightningnetwork/lnd/htlcswitch"
|
"github.com/lightningnetwork/lnd/htlcswitch"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
||||||
|
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/routing"
|
"github.com/lightningnetwork/lnd/routing"
|
||||||
"github.com/lightningnetwork/lnd/signal"
|
"github.com/lightningnetwork/lnd/signal"
|
||||||
@ -67,6 +68,7 @@ var (
|
|||||||
sphxLog = build.NewSubLogger("SPHX", backendLog.Logger)
|
sphxLog = build.NewSubLogger("SPHX", backendLog.Logger)
|
||||||
swprLog = build.NewSubLogger("SWPR", backendLog.Logger)
|
swprLog = build.NewSubLogger("SWPR", backendLog.Logger)
|
||||||
sgnrLog = build.NewSubLogger("SGNR", backendLog.Logger)
|
sgnrLog = build.NewSubLogger("SGNR", backendLog.Logger)
|
||||||
|
wlktLog = build.NewSubLogger("WLKT", backendLog.Logger)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Initialize package-global logger variables.
|
// Initialize package-global logger variables.
|
||||||
@ -85,6 +87,7 @@ func init() {
|
|||||||
signal.UseLogger(ltndLog)
|
signal.UseLogger(ltndLog)
|
||||||
sweep.UseLogger(swprLog)
|
sweep.UseLogger(swprLog)
|
||||||
signrpc.UseLogger(sgnrLog)
|
signrpc.UseLogger(sgnrLog)
|
||||||
|
walletrpc.UseLogger(wlktLog)
|
||||||
}
|
}
|
||||||
|
|
||||||
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
||||||
@ -109,6 +112,7 @@ var subsystemLoggers = map[string]btclog.Logger{
|
|||||||
"SPHX": sphxLog,
|
"SPHX": sphxLog,
|
||||||
"SWPR": swprLog,
|
"SWPR": swprLog,
|
||||||
"SGNR": sgnrLog,
|
"SGNR": sgnrLog,
|
||||||
|
"WLKT": wlktLog,
|
||||||
}
|
}
|
||||||
|
|
||||||
// initLogRotator initializes the logging rotator to write logs to logFile and
|
// initLogRotator initializes the logging rotator to write logs to logFile and
|
||||||
|
Loading…
Reference in New Issue
Block a user