decred.org/dcrwallet/v3@v3.1.0/p2p/log.go (about) 1 // Copyright (c) 2017 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 p2p 6 7 import "github.com/decred/slog" 8 9 var log = slog.Disabled 10 11 // UseLogger sets the package logger, which is slog.Disabled by default. This 12 // should only be called during init before main since access is unsynchronized. 13 func UseLogger(l slog.Logger) { 14 log = l 15 }