github.com/lbryio/lbcd@v0.22.119/fees/log.go (about)

     1  // Copyright (c) 2018-2019 The Decred developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  package fees
     6  
     7  import (
     8  	"github.com/btcsuite/btclog"
     9  )
    10  
    11  // log is a logger that is initialized with no output filters.  This means the
    12  // package will not perform any logging by default until the caller requests it.
    13  // The default amount of logging is none.
    14  var log btclog.Logger
    15  
    16  // DisableLog disables all library log output.  Logging output is disabled
    17  // by default until either UseLogger or SetLogWriter are called.
    18  func DisableLog() {
    19  	log = btclog.Disabled
    20  }
    21  
    22  // UseLogger uses a specified Logger to output package logging info.
    23  // This should be used in preference to SetLogWriter if the caller is also
    24  // using btclog.
    25  func UseLogger(logger btclog.Logger) {
    26  	log = logger
    27  }