[#638] logger: Remove sampling from test loggers

Losing logs is always a bad idea, especially when we debug tests.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-08-23 10:48:23 +03:00 committed by Evgenii Stratonikov
parent 82cc453be9
commit 02b03d9c4f

View file

@ -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()