Skip to content

Commit 92242f5

Browse files
committed
staticaddr: withdrawal manager and interface
1 parent f98523d commit 92242f5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

loopd/log.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) {
4141
lnd.AddSubLogger(
4242
root, staticaddr.Subsystem, intercept, staticaddr.UseLogger,
4343
)
44+
lnd.AddSubLogger(
45+
root, withdraw.Subsystem, intercept, withdraw.UseLogger,
46+
)
4447
lnd.AddSubLogger(
4548
root, liquidity.Subsystem, intercept, liquidity.UseLogger,
4649
)
@@ -56,7 +59,7 @@ func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) {
5659
// genSubLogger creates a logger for a subsystem. We provide an instance of
5760
// a signal.Interceptor to be able to shutdown in the case of a critical error.
5861
func genSubLogger(root *build.RotatingLogWriter,
59-
interceptor signal.Interceptor) func(string) btclog.Logger {
62+
interceptor signal.Interceptor) func(string) btclog.Logger {
6063

6164
// Create a shutdown function which will request shutdown from our
6265
// interceptor if it is listening.

staticaddr/withdraw/log.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@ package withdraw
22

33
import (
44
"github.com/btcsuite/btclog"
5+
"github.com/lightningnetwork/lnd/build"
56
)
67

8+
// Subsystem defines the sub system name of this package.
9+
const Subsystem = "SADDR"
10+
711
// log is a logger that is initialized with no output filters. This means the
812
// package will not perform any logging by default until the caller requests it.
913
var log btclog.Logger
1014

15+
// The default amount of logging is none.
16+
func init() {
17+
UseLogger(build.NewSubLogger(Subsystem, nil))
18+
}
19+
1120
// UseLogger uses a specified Logger to output package logging info. This should
1221
// be used in preference to SetLogWriter if the caller is also using btclog.
1322
func UseLogger(logger btclog.Logger) {

0 commit comments

Comments
 (0)