Monorepo for Tangled tangled.org
757
fork

Configure Feed

Select the types of activity you want to include in your feed.

knotmirror/xrpc: log with xrpc method name

Signed-off-by: Seongmin Lee <git@boltless.me>

+3 -2
+2 -1
knotmirror/xrpc/git_get_tree.go
··· 21 21 ref = r.URL.Query().Get("ref") // ref can be empty (git.Open handles this) 22 22 path = r.URL.Query().Get("path") // path can be empty (defaults to root) 23 23 ) 24 + l := x.logger.With("method", "git.getTree", "repo", repoQuery, "ref", ref) 24 25 25 26 repo, err := syntax.ParseATURI(repoQuery) 26 27 if err != nil || repo.RecordKey() == "" { ··· 30 31 31 32 out, err := x.getTree(r.Context(), repo, ref, path) 32 33 if err != nil { 33 - x.logger.Warn("local mirror failed, trying proxy", "repo", repo, "err", err) 34 + l.Warn("local mirror failed, trying proxy", "repo", repo, "err", err) 34 35 if x.proxyToKnot(w, r, repo) { 35 36 return 36 37 }
+1 -1
knotmirror/xrpc/git_list_languages.go
··· 18 18 repoQuery = r.URL.Query().Get("repo") 19 19 ref = r.URL.Query().Get("ref") 20 20 ) 21 - l := x.logger.With("repo", repoQuery, "ref", ref) 21 + l := x.logger.With("method", "git.listLanguages", "repo", repoQuery, "ref", ref) 22 22 23 23 repo, err := syntax.ParseATURI(repoQuery) 24 24 if err != nil || repo.RecordKey() == "" {