From 02b03d9c4fdb05212f585d1974ec1c089102adb8 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 23 Aug 2023 10:48:23 +0300 Subject: [PATCH] [#638] logger: Remove sampling from test loggers Losing logs is always a bad idea, especially when we debug tests. Signed-off-by: Evgenii Stratonikov --- pkg/util/logger/test/logger.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/util/logger/test/logger.go b/pkg/util/logger/test/logger.go index e78a117f..4a287087 100644 --- a/pkg/util/logger/test/logger.go +++ b/pkg/util/logger/test/logger.go @@ -9,8 +9,6 @@ import ( "go.uber.org/zap/zapcore" ) -const sampling = 1000 - // NewLogger creates a new logger. // // If debug, development logger is created. @@ -20,11 +18,6 @@ func NewLogger(t testing.TB, debug bool) *logger.Logger { if debug { cfg := zap.NewDevelopmentConfig() - cfg.Sampling = &zap.SamplingConfig{ - Initial: sampling, - Thereafter: sampling, - } - cfg.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder log, err := cfg.Build()