log: add logger for the autopilot package
This commit is contained in:
parent
8dd4245d43
commit
ba5ed9e8d2
4
log.go
4
log.go
@ -11,6 +11,7 @@ import (
|
|||||||
"github.com/btcsuite/btclog"
|
"github.com/btcsuite/btclog"
|
||||||
"github.com/jrick/logrotate/rotator"
|
"github.com/jrick/logrotate/rotator"
|
||||||
"github.com/lightninglabs/neutrino"
|
"github.com/lightninglabs/neutrino"
|
||||||
|
"github.com/lightningnetwork/lnd/autopilot"
|
||||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||||
"github.com/lightningnetwork/lnd/channeldb"
|
"github.com/lightningnetwork/lnd/channeldb"
|
||||||
"github.com/lightningnetwork/lnd/discovery"
|
"github.com/lightningnetwork/lnd/discovery"
|
||||||
@ -68,6 +69,7 @@ var (
|
|||||||
cmgrLog = backendLog.Logger("CMGR")
|
cmgrLog = backendLog.Logger("CMGR")
|
||||||
crtrLog = backendLog.Logger("CRTR")
|
crtrLog = backendLog.Logger("CRTR")
|
||||||
btcnLog = backendLog.Logger("BTCN")
|
btcnLog = backendLog.Logger("BTCN")
|
||||||
|
atplLog = backendLog.Logger("ATPL")
|
||||||
)
|
)
|
||||||
|
|
||||||
// Initialize package-global logger variables.
|
// Initialize package-global logger variables.
|
||||||
@ -80,6 +82,7 @@ func init() {
|
|||||||
connmgr.UseLogger(cmgrLog)
|
connmgr.UseLogger(cmgrLog)
|
||||||
routing.UseLogger(crtrLog)
|
routing.UseLogger(crtrLog)
|
||||||
neutrino.UseLogger(btcnLog)
|
neutrino.UseLogger(btcnLog)
|
||||||
|
autopilot.UseLogger(atplLog)
|
||||||
}
|
}
|
||||||
|
|
||||||
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
||||||
@ -99,6 +102,7 @@ var subsystemLoggers = map[string]btclog.Logger{
|
|||||||
"CMGR": cmgrLog,
|
"CMGR": cmgrLog,
|
||||||
"CRTR": crtrLog,
|
"CRTR": crtrLog,
|
||||||
"BTCN": btcnLog,
|
"BTCN": btcnLog,
|
||||||
|
"ATPL": atplLog,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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