fix: logx disable not working in some cases (#2306)

* fix: logx disable not working in some cases

* fix: test fail
This commit is contained in:
Kevin Wan
2022-08-27 19:24:31 +08:00
committed by GitHub
parent 5d4ae201d0
commit 2d60f0c65a
4 changed files with 6 additions and 9 deletions

View File

@@ -599,6 +599,7 @@ func TestDisableStat(t *testing.T) {
}
func TestSetWriter(t *testing.T) {
atomic.StoreUint32(&disableLog, 0)
Reset()
SetWriter(nopWriter{})
assert.NotNil(t, writer.Load())