File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 55 "github.com/lightninglabs/loop"
66 "github.com/lightninglabs/loop/lndclient"
77 "github.com/lightninglabs/loop/loopdb"
8+ "github.com/lightninglabs/loop/lsat"
89 "github.com/lightningnetwork/lnd/build"
910)
1011
@@ -19,6 +20,7 @@ func init() {
1920 addSubLogger ("LOOP" , loop .UseLogger )
2021 addSubLogger ("LNDC" , lndclient .UseLogger )
2122 addSubLogger ("STORE" , loopdb .UseLogger )
23+ addSubLogger (lsat .Subsystem , lsat .UseLogger )
2224}
2325
2426// addSubLogger is a helper method to conveniently create and register the
Original file line number Diff line number Diff line change 1+ package lsat
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 = "LSAT"
10+
11+ // log is a logger that is initialized with no output filters. This
12+ // means the package will not perform any logging by default until the caller
13+ // requests it.
14+ var log btclog.Logger
15+
16+ // The default amount of logging is none.
17+ func init () {
18+ UseLogger (build .NewSubLogger (Subsystem , nil ))
19+ }
20+
21+ // UseLogger uses a specified Logger to output package logging info.
22+ // This should be used in preference to SetLogWriter if the caller is also
23+ // using btclog.
24+ func UseLogger (logger btclog.Logger ) {
25+ log = logger
26+ }
You can’t perform that action at this time.
0 commit comments