mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
This commit updates: - LND - pool - loop - taproot-assets - faraday - lighting-node-connect - aperture - lndclient - btclog We start using the new btclog v2 library and the associated breaking changes in the lnd/build package. With this commit, we deprecate the `--remote.lit-maxlogfiles` and `--remote.lit-maxlogfilesize` options and introduce new logging options under the `--remote.lit-logging` namespace. Finally, the LND update introduced a new `MaxBlocksMinedPerTest` variable in the `lntest` package that we now need to override in order for our itests to pass.
25 lines
632 B
Go
25 lines
632 B
Go
package db
|
|
|
|
import (
|
|
"github.com/btcsuite/btclog/v2"
|
|
"github.com/lightningnetwork/lnd/build"
|
|
)
|
|
|
|
const Subsystem = "SQLD"
|
|
|
|
// 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 btclog.Logger
|
|
|
|
// The default amount of logging is none.
|
|
func init() {
|
|
UseLogger(build.NewSubLogger(Subsystem, nil))
|
|
}
|
|
|
|
// UseLogger uses a specified Logger to output package logging info.
|
|
// This should be used in preference to SetLogWriter if the caller is also
|
|
// using btclog.
|
|
func UseLogger(logger btclog.Logger) {
|
|
log = logger
|
|
}
|