refactor: better request logging

This commit is contained in:
Deluan
2020-02-01 20:07:15 -05:00
parent e97d805444
commit 203754726b
4 changed files with 62 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ func checkRequiredParameters(next http.Handler) http.Handler {
ctx = context.WithValue(ctx, "username", user)
ctx = context.WithValue(ctx, "client", client)
ctx = context.WithValue(ctx, "version", version)
log.Info(ctx, "New Subsonic API request", "username", user, "client", client, "version", version, "path", r.URL.Path)
log.Info(ctx, "API: New request "+r.URL.Path, "username", user, "client", client, "version", version)
r = r.WithContext(ctx)
next.ServeHTTP(w, r)