Skip to content

Commit

Permalink
test: adding test for this change
Browse files Browse the repository at this point in the history
  • Loading branch information
themantre committed Oct 2, 2023
1 parent 4aca152 commit 26fa1ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/logger/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestObjLogger(t *testing.T) {
c.Colorful = false
InitGlobalLogger(c)

globalInst.config.Levels["test"] = "warn"
l := NewSubLogger("test", Foo{})
var buf bytes.Buffer
l.logger = l.logger.Output(&buf)
Expand All @@ -46,7 +47,7 @@ func TestObjLogger(t *testing.T) {
assert.Contains(t, out, "foo")
assert.NotContains(t, out, "trace")
assert.NotContains(t, out, "debug")
assert.Contains(t, out, "info")
assert.NotContains(t, out, "info")
assert.Contains(t, out, "warn")
assert.Contains(t, out, "error")
}
Expand Down

0 comments on commit 26fa1ab

Please sign in to comment.