grafana/pkg/services/ngalert/notifier/log.go
Yuri Tseretyan a8b4a4bb45
Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622)
* update to alerting 20230418161049-5f374e58cb32
* rename renamed structs in https://github.com/grafana/alerting/pull/73
* update ValidateContactPoint to use BuildReceiverConfiguration
* update logger factory according to changes
* rewrite integration builder
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-04-25 13:39:46 -04:00

20 lines
488 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 ...interface{}) alertingLogging.Logger {
return &logWrapper{log.New(append([]interface{}{logger}, ctx...)...)}
}
type logWrapper struct {
*log.ConcreteLogger
}
func (l logWrapper) New(ctx ...interface{}) alertingLogging.Logger {
return logWrapper{l.ConcreteLogger.New(ctx...)}
}