lnwallet: switch name of package logger to avoid module collision

This commit is contained in:
Olaoluwa Osuntokun
2016-07-27 11:28:52 -07:00
parent 13a95be7c0
commit 8a56fbf196
3 changed files with 15 additions and 17 deletions

View File

@ -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)
}