github.com/decred/politeia@v1.4.0/politeiawww/legacy/codetracker/github/api/log.go (about)

     1  // Copyright (c) 2013-2015 The btcsuite developers
     2  // Copyright (c) 2020 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 api
     7  
     8  import "github.com/decred/slog"
     9  
    10  var log = slog.Disabled
    11  
    12  // UseLogger sets the package-wide logger.  Any calls to this function must be
    13  // made before a server is created and used (it is not concurrent safe).
    14  func UseLogger(logger slog.Logger) {
    15  	log = logger
    16  }