fix: comment NullLogger

This commit is contained in:
Rowan Bohde 2024-05-01 16:28:13 -05:00
parent a2b35caa31
commit e6d805119f

View file

@ -6,8 +6,12 @@ import (
log "github.com/sirupsen/logrus"
)
type NullLogger struct {}
// NullLogger is used to create a new JobLogger to discard logs. This
// will prevent these logs from being logged to the stdout, but
// forward them to the Reporter via its hook.
type NullLogger struct{}
// WithJobLogger creates a new logrus.Logger that will discard all logs.
func (n NullLogger) WithJobLogger() *log.Logger {
logger := log.New()
logger.SetOutput(io.Discard)