lnwallet: switch name of package logger to avoid module collision
This commit is contained in:
3 files changed
+15
-17
No files matched your search
+3
-3
@@ -11,7 +11,7 @@ import (
|
||||
// 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.
|
||||
var log btclog.Logger
|
||||
var walletLog btclog.Logger
|
||||
|
||||
// The default amount of logging is none.
|
||||
func init() {
|
||||
@@ -21,14 +21,14 @@ func init() {
|
||||
// DisableLog disables all library log output. Logging output is disabled
|
||||
// by default until either UseLogger or SetLogWriter are called.
|
||||
func DisableLog() {
|
||||
log = btclog.Disabled
|
||||
walletLog = btclog.Disabled
|
||||
}
|
||||
|
||||
// UseLogger uses a specified Logger to output package logging info.
|
||||
// This should be used in preference to SetLogWriter if the caller is also
|
||||
// using btclog.
|
||||
func UseLogger(logger btclog.Logger) {
|
||||
log = logger
|
||||
walletLog = logger
|
||||
btcwallet.UseLogger(logger)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user