Skip to content

Commit e8272e1

Browse files
committed
use a local logger version
1 parent 81d0959 commit e8272e1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

http/banlist/banlist_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import (
1313
"github.com/stretchr/testify/require"
1414
)
1515

16-
func init() {
17-
logrus.SetLevel(logrus.DebugLevel)
18-
}
19-
2016
func TestBanlistMissingFile(t *testing.T) {
2117
bl := newBanlist(tl(t), "not a path")
2218
require.Error(t, bl.update())
@@ -87,7 +83,9 @@ func TestBanlistBanning(t *testing.T) {
8783
}
8884

8985
func tl(t *testing.T) logrus.FieldLogger {
90-
return logrus.WithField("test", t.Name())
86+
l := logrus.New()
87+
l.SetLevel(logrus.DebugLevel)
88+
return l.WithField("test", t.Name())
9189
}
9290

9391
func testList(t *testing.T, config *Config) *Banlist {

0 commit comments

Comments
 (0)