Chore: capitalise messages for alerting (#74335)

This commit is contained in:
Serge Zaitsev
2023-09-04 18:46:34 +02:00
committed by GitHub
parent bd12ce0cbc
commit 58f6648505
26 changed files with 110 additions and 110 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ func NewHooks(logger log.Logger) *Hooks {
// Add creates a new request hook for a path, causing requests to the path to
// be handled by the hook function, and not the original handler.
func (h *Hooks) Set(path string, hook RequestHandlerFunc) {
h.logger.Info("setting hook override for the specified route", "path", path)
h.logger.Info("Setting hook override for the specified route", "path", path)
h.hooks[path] = hook
}
@@ -35,7 +35,7 @@ func (h *Hooks) Set(path string, hook RequestHandlerFunc) {
func (h *Hooks) Wrap(next RequestHandlerFunc) RequestHandlerFunc {
return func(req *contextmodel.ReqContext) response.Response {
if hook, ok := h.hooks[req.Context.Req.URL.Path]; ok {
h.logger.Debug("hook defined - invoking new handler", "path", req.Context.Req.URL.Path)
h.logger.Debug("Hook defined - invoking new handler", "path", req.Context.Req.URL.Path)
return hook(req)
}
return next(req)