Skip to content

Commit a3a0619

Browse files
committed
Allow setting testing log level.
1 parent faeac96 commit a3a0619

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

logger/logger.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,15 @@ type TestLogger interface {
495495
}
496496

497497
func NewTestLogger(t TestLogger) Logger {
498+
return NewTestLoggerLevel(t, 0)
499+
}
500+
501+
func NewTestLoggerLevel(t TestLogger, lvl int) Logger {
498502
return LogRLogger(funcr.New(func(prefix, args string) {
499503
if prefix != "" {
500504
t.Logf("%s: %s\n", prefix, args)
501505
} else {
502506
t.Log(args)
503507
}
504-
}, funcr.Options{}))
508+
}, funcr.Options{Verbosity: lvl}))
505509
}

0 commit comments

Comments
 (0)