routing: define subsystem constant

This commit is contained in:
Joost Jager 2019-11-09 14:22:40 +01:00
parent 16ca36985e
commit f289dbd826
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7
2 changed files with 4 additions and 2 deletions

2
log.go

@ -79,7 +79,6 @@ func init() {
addSubLogger("CHDB", channeldb.UseLogger)
addSubLogger("HSWC", htlcswitch.UseLogger)
addSubLogger("CMGR", connmgr.UseLogger)
addSubLogger("CRTR", routing.UseLogger)
addSubLogger("BTCN", neutrino.UseLogger)
addSubLogger("CNCT", contractcourt.UseLogger)
addSubLogger("SPHX", sphinx.UseLogger)
@ -99,6 +98,7 @@ func init() {
addSubLogger("PRNF", peernotifier.UseLogger)
addSubLogger("CHFD", chanfunding.UseLogger)
addSubLogger(routing.Subsystem, routing.UseLogger)
addSubLogger(routerrpc.Subsystem, routerrpc.UseLogger)
addSubLogger(wtclientrpc.Subsystem, wtclientrpc.UseLogger)
addSubLogger(chanfitness.Subsystem, chanfitness.UseLogger)

@ -11,9 +11,11 @@ import (
// it.
var log btclog.Logger
const Subsystem = "CRTR"
// The default amount of logging is none.
func init() {
UseLogger(build.NewSubLogger("CRTR", nil))
UseLogger(build.NewSubLogger(Subsystem, nil))
}
// DisableLog disables all library log output. Logging output is disabled by