mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-29 13:43:49 +02:00
chainnfts: export logger for use by concrete implementations
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
|||||||
// log is a logger that is initialized with no output filters. This
|
// 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
|
// means the package will not perform any logging by default until the caller
|
||||||
// requests it.
|
// requests it.
|
||||||
var log btclog.Logger
|
var Log btclog.Logger
|
||||||
|
|
||||||
// The default amount of logging is none.
|
// The default amount of logging is none.
|
||||||
func init() {
|
func init() {
|
||||||
@@ -20,14 +20,14 @@ func init() {
|
|||||||
// DisableLog disables all library log output. Logging output is disabled
|
// DisableLog disables all library log output. Logging output is disabled
|
||||||
// by default until either UseLogger or SetLogWriter are called.
|
// by default until either UseLogger or SetLogWriter are called.
|
||||||
func DisableLog() {
|
func DisableLog() {
|
||||||
log = btclog.Disabled
|
Log = btclog.Disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
// UseLogger uses a specified Logger to output package logging info.
|
// UseLogger uses a specified Logger to output package logging info.
|
||||||
// This should be used in preference to SetLogWriter if the caller is also
|
// This should be used in preference to SetLogWriter if the caller is also
|
||||||
// using btclog.
|
// using btclog.
|
||||||
func UseLogger(logger btclog.Logger) {
|
func UseLogger(logger btclog.Logger) {
|
||||||
log = logger
|
Log = logger
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetLogWriter uses a specified io.Writer to output package logging info.
|
// SetLogWriter uses a specified io.Writer to output package logging info.
|
||||||
|
Reference in New Issue
Block a user