mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
20 lines
464 B
Go
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...)}
|
|
}
|