log: add missing loggers

This commit is contained in:
Oliver Gugger
2020-09-02 10:50:30 +02:00
parent 5237b07a6e
commit cf025a2f6f
2 changed files with 12 additions and 10 deletions

View File

@@ -8,6 +8,8 @@ import (
"github.com/lightningnetwork/lnd/build"
)
const Subsystem = "PRXY"
// log is a logger that is initialized with no output filters. This
// means the package will not perform any logging by default until the caller
// requests it.
@@ -15,13 +17,7 @@ var log btclog.Logger
// The default amount of logging is none.
func init() {
UseLogger(build.NewSubLogger("PRXY", nil))
}
// DisableLog disables all library log output. Logging output is disabled
// by default until UseLogger is called.
func DisableLog() {
UseLogger(btclog.Disabled)
UseLogger(build.NewSubLogger(Subsystem, nil))
}
// UseLogger uses a specified Logger to output package logging info.