decred.org/dcrwallet/v3@v3.1.0/chain/log.go (about)

     1  // Copyright (c) 2013-2014 The btcsuite developers
     2  // Copyright (c) 2018 The Decred developers
     3  // Use of this source code is governed by an ISC
     4  // license that can be found in the LICENSE file.
     5  
     6  package chain
     7  
     8  import "github.com/decred/slog"
     9  
    10  // log is a logger that is initialized with no output filters.  This
    11  // means the package will not perform any logging by default until the caller
    12  // requests it.
    13  var log = slog.Disabled
    14  
    15  // UseLogger uses a specified Logger to output package logging info.
    16  // This should be used in preference to SetLogWriter if the caller is also
    17  // using slog.
    18  func UseLogger(logger slog.Logger) {
    19  	log = logger
    20  }