remove the global log error/warn etc functions (#41404)

* remove the global log error/warn etc functions and use request context logger whenever possible
This commit is contained in:
ying-jeanne
2021-11-08 17:56:56 +01:00
committed by GitHub
parent bda60f3458
commit 54de1078c8
28 changed files with 88 additions and 93 deletions

View File

@@ -17,6 +17,7 @@ import (
)
var pluginProxyTransport *http.Transport
var applog = log.New("app.routes")
func (hs *HTTPServer) initAppPluginRoutes(r *web.Mux) {
pluginProxyTransport = &http.Transport{
@@ -51,7 +52,8 @@ func (hs *HTTPServer) initAppPluginRoutes(r *web.Mux) {
for _, method := range strings.Split(route.Method, ",") {
r.Handle(strings.TrimSpace(method), url, handlers)
}
log.Debug("Plugins: Adding proxy route", "url", url)
applog.Debug("Plugins: Adding proxy route", "url", url)
}
}
}