grafana/pkg/services/ngalert/notifier/log.go
2023-08-30 18:46:47 +03:00

20 lines
464 B
Go

package notifier
import (
alertingLogging "github.com/grafana/alerting/logging"
"github.com/grafana/grafana/pkg/infra/log"
)
var LoggerFactory alertingLogging.LoggerFactory = func(logger string, ctx ...any) alertingLogging.Logger {
return &logWrapper{log.New(append([]any{logger}, ctx...)...)}
}
type logWrapper struct {
*log.ConcreteLogger
}
func (l logWrapper) New(ctx ...any) alertingLogging.Logger {
return logWrapper{l.ConcreteLogger.New(ctx...)}
}