From 7a61d5e743cfd0e7018a2a840972d42268b7e11c Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Mon, 15 Jul 2024 14:44:25 -0300 Subject: [PATCH] loopout_test: enable logging in sweepbatcher --- loopout_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/loopout_test.go b/loopout_test.go index 03cd0e241..1297f90f1 100644 --- a/loopout_test.go +++ b/loopout_test.go @@ -4,6 +4,7 @@ import ( "context" "errors" "math" + "os" "testing" "time" @@ -11,6 +12,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btclog" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/sweep" @@ -255,6 +257,11 @@ func TestCustomSweepConfTarget(t *testing.T) { func testCustomSweepConfTarget(t *testing.T) { defer test.Guard(t)() + // Setup logger for sweepbatcher. + logger := btclog.NewBackend(os.Stdout).Logger("SWEEP") + logger.SetLevel(btclog.LevelTrace) + sweepbatcher.UseLogger(logger) + lnd := test.NewMockLnd() ctx := test.NewContext(t, lnd) server := newServerMock(lnd)