Skip to content

Commit

Permalink
json: clarify magic 100 constant
Browse files Browse the repository at this point in the history
This addresses review feedback from
kubernetes#108995 (comment).
  • Loading branch information
pohly committed May 31, 2022
1 parent 04ecc1b commit 7b8d711
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion staging/src/k8s.io/component-base/logs/json/klog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/stretchr/testify/assert"
"go.uber.org/zap/zapcore"

"k8s.io/component-base/config"
"k8s.io/klog/v2"
)

Expand Down Expand Up @@ -239,7 +240,9 @@ func TestKlogIntegration(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
var buffer bytes.Buffer
writer := zapcore.AddSync(&buffer)
logger, _ := NewJSONLogger(100, writer, nil, nil)
// This level is high enough to enable all log messages from this test.
verbosityLevel := config.VerbosityLevel(100)
logger, _ := NewJSONLogger(verbosityLevel, writer, nil, nil)
klog.SetLogger(logger)
defer klog.ClearLogger()

Expand Down

0 comments on commit 7b8d711

Please sign in to comment.