mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
b6049ff94b
And replaces all usage of `logClosure` with `lnutils.LogClosure`.
26 lines
552 B
Go
26 lines
552 B
Go
package chancloser
|
|
|
|
import (
|
|
"github.com/btcsuite/btclog"
|
|
"github.com/lightningnetwork/lnd/build"
|
|
)
|
|
|
|
// chancloserLog is a logger that is initialized with the btclog.Disabled
|
|
// logger.
|
|
var chancloserLog btclog.Logger
|
|
|
|
// The default amount of logging is none.
|
|
func init() {
|
|
UseLogger(build.NewSubLogger("CHCL", nil))
|
|
}
|
|
|
|
// DisableLog disables all logging output.
|
|
func DisableLog() {
|
|
UseLogger(btclog.Disabled)
|
|
}
|
|
|
|
// UseLogger uses a specified Logger to output package logging info.
|
|
func UseLogger(logger btclog.Logger) {
|
|
chancloserLog = logger
|
|
}
|