core/logging: less verbose logs (#5040)

This commit is contained in:
Caleb Doxsey 2024-03-29 15:26:20 -06:00 committed by GitHub
parent ecbd84b7df
commit 4ac06d3bbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 51 additions and 42 deletions

View file

@ -24,6 +24,9 @@ func (c certMagicLoggerCore) With(fs []zapcore.Field) zapcore.Core {
}
func (c certMagicLoggerCore) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry {
if e.Level == zap.InfoLevel {
e.Level = zap.DebugLevel
}
if !c.Enabled(e.Level) {
return ce
}
@ -31,6 +34,9 @@ func (c certMagicLoggerCore) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *z
}
func (c certMagicLoggerCore) Write(e zapcore.Entry, fs []zapcore.Field) error {
if e.Level == zap.InfoLevel {
e.Level = zap.DebugLevel
}
fs = append(c.fields, fs...)
for _, f := range fs {
if f.Type == zapcore.ErrorType && errors.Is(f.Interface.(error), certmagic.ErrNoOCSPServerSpecified) {