dcrd/fees/log.go
Matheus Degiovani 0055632f68
fees: Add estimator package
This adds the first version of the fees package, responsible for
performing fee estimation of network transactions.

The main goal of fee estimation is to allow the usage of dynamic fees
by wallets, contingent on block contention and the desired confirmation
range for a given transaction.

This version was based on bitcoin core fee estimation.
2018-12-06 19:40:39 -02:00

32 lines
852 B
Go

// Copyright (c) 2018 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package fees
import (
"github.com/decred/slog"
)
// 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 slog.Logger
// The default amount of logging is none.
func init() {
DisableLog()
}
// DisableLog disables all library log output. Logging output is disabled by
// default until either UseLogger or SetLogWriter are called.
func DisableLog() {
log = slog.Disabled
}
// UseLogger uses a specified Logger to output fee estimator logging info. This
// should be used in preference to SetLogWriter if the caller is also using
// slog.
func UseLogger(logger slog.Logger) {
log = logger
}