mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-26 22:48:07 +02:00
bugfixes
This commit is contained in:
parent
85f06ab36b
commit
bfd7cf73b3
9 changed files with 43 additions and 18 deletions
|
@ -269,13 +269,17 @@ func New(t testing.TB, opts ...EnvironmentOption) Environment {
|
|||
writer := log.NewMultiWriter()
|
||||
silent := options.forceSilent || isSilent(t)
|
||||
if silent {
|
||||
// this sets the global zap level to fatal, then resets the global zerolog
|
||||
// level to debug
|
||||
log.SetLevel(zerolog.FatalLevel)
|
||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||
log.DebugDisableGlobalWarnings.Store(true)
|
||||
log.DebugDisableZapLogger.Store(true)
|
||||
} else {
|
||||
log.SetLevel(zerolog.InfoLevel)
|
||||
writer.Add(os.Stdout)
|
||||
}
|
||||
log.DebugDisableGlobalWarnings.Store(silent)
|
||||
log.DebugDisableGlobalMessages.Store(silent)
|
||||
log.DebugDisableZapLogger.Store(silent)
|
||||
setGrpcLoggerOnce.Do(func() {
|
||||
grpclog.SetLoggerV2(grpclog.NewLoggerV2WithVerbosity(io.Discard, io.Discard, io.Discard, 0))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue