2023-11-09 19:16:31 +01:00
|
|
|
package staticaddr
|
|
|
|
|
|
|
|
|
|
import (
|
2025-03-06 14:03:27 +01:00
|
|
|
"github.com/btcsuite/btclog/v2"
|
2024-05-06 14:17:16 +02:00
|
|
|
"github.com/lightninglabs/loop/staticaddr/address"
|
|
|
|
|
"github.com/lightninglabs/loop/staticaddr/deposit"
|
2024-07-30 12:23:35 +02:00
|
|
|
"github.com/lightninglabs/loop/staticaddr/loopin"
|
2024-05-06 14:19:07 +02:00
|
|
|
"github.com/lightninglabs/loop/staticaddr/withdraw"
|
2023-11-09 19:16:31 +01:00
|
|
|
"github.com/lightningnetwork/lnd/build"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Subsystem defines the sub system name of this package.
|
|
|
|
|
const Subsystem = "SADDR"
|
|
|
|
|
|
|
|
|
|
// 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
|
2024-05-06 14:17:16 +02:00
|
|
|
address.UseLogger(log)
|
|
|
|
|
deposit.UseLogger(log)
|
2024-05-06 14:19:07 +02:00
|
|
|
withdraw.UseLogger(log)
|
2024-07-30 12:23:35 +02:00
|
|
|
loopin.UseLogger(log)
|
2024-03-07 17:27:33 +01:00
|
|
|
}
|