mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 07:42:31 +08:00
chore: avoid aliasing models in middleware (#22484)
This commit is contained in:
@ -19,7 +19,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"gopkg.in/macaron.v1"
|
||||
@ -48,7 +48,7 @@ func Logger() macaron.Handler {
|
||||
}
|
||||
|
||||
if ctx, ok := c.Data["ctx"]; ok {
|
||||
ctxTyped := ctx.(*m.ReqContext)
|
||||
ctxTyped := ctx.(*models.ReqContext)
|
||||
if status == 500 {
|
||||
ctxTyped.Logger.Error("Request Completed", "method", req.Method, "path", req.URL.Path, "status", status, "remote_addr", c.RemoteAddr(), "time_ms", int64(timeTakenMs), "size", rw.Size(), "referer", req.Referer())
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user