forked from TrueCloudLab/frostfs-node
[#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:
parent
82cc453be9
commit
02b03d9c4f
1 changed files with 0 additions and 7 deletions
|
@ -9,8 +9,6 @@ import (
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
)
|
)
|
||||||
|
|
||||||
const sampling = 1000
|
|
||||||
|
|
||||||
// NewLogger creates a new logger.
|
// NewLogger creates a new logger.
|
||||||
//
|
//
|
||||||
// If debug, development logger is created.
|
// If debug, development logger is created.
|
||||||
|
@ -20,11 +18,6 @@ func NewLogger(t testing.TB, debug bool) *logger.Logger {
|
||||||
|
|
||||||
if debug {
|
if debug {
|
||||||
cfg := zap.NewDevelopmentConfig()
|
cfg := zap.NewDevelopmentConfig()
|
||||||
cfg.Sampling = &zap.SamplingConfig{
|
|
||||||
Initial: sampling,
|
|
||||||
Thereafter: sampling,
|
|
||||||
}
|
|
||||||
|
|
||||||
cfg.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
|
cfg.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
|
||||||
|
|
||||||
log, err := cfg.Build()
|
log, err := cfg.Build()
|
||||||
|
|
Loading…
Reference in a new issue