mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 11:36:57 +00:00
add reqId to all logging messages I could find
This commit is contained in:
parent
2438de0eb2
commit
f87c692f7a
17 changed files with 89 additions and 54 deletions
|
@ -26,9 +26,9 @@ func Handler(
|
|||
canonicalDomainCache, redirectsCache cache.ICache,
|
||||
) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, req *http.Request) {
|
||||
log.Debug().Msg("\n----------------------------------------------------------")
|
||||
log := log.With().Strs("Handler", []string{req.Host, req.RequestURI}).Logger()
|
||||
ctx := context.New(w, req)
|
||||
log := log.With().Str("ReqId", ctx.ReqId).Strs("Handler", []string{req.Host, req.RequestURI}).Logger()
|
||||
log.Debug().Msg("\n----------------------------------------------------------")
|
||||
|
||||
ctx.RespWriter.Header().Set("Server", "pages-server")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue