mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
This commit adds the boilerplate code we will need in order to start using SQL backed stores (namely sqlite and postgres) for our DB backend. NOTE that this has been copied from the taproot-assets repo.
25 lines
629 B
Go
25 lines
629 B
Go
package db
|
|
|
|
import (
|
|
"github.com/btcsuite/btclog"
|
|
"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
|
|
}
|