forked from TrueCloudLab/frostfs-http-gw
[#148] Add trace_id to logs
Signed-off-by: Roman Loginov <r.loginov@yadro.com>
This commit is contained in:
parent
495f745535
commit
fc86ab3511
7 changed files with 104 additions and 48 deletions
|
@ -113,8 +113,10 @@ func urlencode(prefix, filename string) string {
|
|||
}
|
||||
|
||||
func (h *Handler) browseObjects(c *fasthttp.RequestCtx, bucketInfo *data.BucketInfo, prefix string) {
|
||||
log := h.log.With(zap.String("bucket", bucketInfo.Name))
|
||||
ctx := utils.GetContextFromRequest(c)
|
||||
reqLog := utils.GetReqLogOrDefault(ctx, h.log)
|
||||
log := reqLog.With(zap.String("bucket", bucketInfo.Name))
|
||||
|
||||
nodes, err := h.listObjects(ctx, bucketInfo, prefix)
|
||||
if err != nil {
|
||||
logAndSendBucketError(c, log, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue