File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 44 "github.com/btcsuite/btclog"
55 "github.com/lightninglabs/loop/staticaddr/address"
66 "github.com/lightninglabs/loop/staticaddr/deposit"
7+ "github.com/lightninglabs/loop/staticaddr/loopin"
78 "github.com/lightninglabs/loop/staticaddr/withdraw"
89 "github.com/lightningnetwork/lnd/build"
910)
@@ -27,4 +28,5 @@ func UseLogger(logger btclog.Logger) {
2728 address .UseLogger (log )
2829 deposit .UseLogger (log )
2930 withdraw .UseLogger (log )
31+ loopin .UseLogger (log )
3032}
Original file line number Diff line number Diff line change 1+ package loopin
2+
3+ import (
4+ "github.com/btcsuite/btclog"
5+ "github.com/lightningnetwork/lnd/build"
6+ )
7+
8+ // Subsystem defines the sub system name of this package.
9+ const Subsystem = "SADDR"
10+
11+ // log is a logger that is initialized with no output filters. This means the
12+ // package will not perform any logging by default until the caller requests it.
13+ var log btclog.Logger
14+
15+ // The default amount of logging is none.
16+ func init () {
17+ UseLogger (build .NewSubLogger (Subsystem , nil ))
18+ }
19+
20+ // UseLogger uses a specified Logger to output package logging info. This should
21+ // be used in preference to SetLogWriter if the caller is also using btclog.
22+ func UseLogger (logger btclog.Logger ) {
23+ log = logger
24+ }
You can’t perform that action at this time.
0 commit comments