mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* 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>
20 lines
488 B
Go
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...)}
|
|
}
|