mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Add username to datasource plugin logging (#59893)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
@@ -35,6 +35,8 @@ func Logger(cfg *setting.Cfg) web.Middleware {
|
||||
|
||||
// we have to init the context with the counter here to update the request
|
||||
r = r.WithContext(log.InitCounter(r.Context()))
|
||||
// put the start time on context so we can measure it later.
|
||||
r = r.WithContext(log.InitstartTime(r.Context(), time.Now()))
|
||||
|
||||
rw := web.Rw(w, r)
|
||||
next.ServeHTTP(rw, r)
|
||||
|
||||
Reference in New Issue
Block a user