forked from TrueCloudLab/frostfs-s3-gw
[#396] Add user to response
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
9f3ea470e6
commit
b5fae316cf
2 changed files with 4 additions and 0 deletions
|
@ -328,6 +328,9 @@ func LogSuccessResponse(l *zap.Logger) Func {
|
|||
if reqInfo.ObjectName != "" {
|
||||
fields = append(fields, zap.String("object", reqInfo.ObjectName))
|
||||
}
|
||||
if reqInfo.User != "" {
|
||||
fields = append(fields, zap.String("user", reqInfo.User))
|
||||
}
|
||||
|
||||
if traceID, err := trace.TraceIDFromHex(reqInfo.TraceID); err == nil && traceID.IsValid() {
|
||||
fields = append(fields, zap.String("trace_id", reqInfo.TraceID))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue