From 7154b8a56827c850861fba81376474652ee79e58 Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Mon, 25 Mar 2019 13:40:08 -0700 Subject: [PATCH] Error log: Correct error type in anonymous mode (#7414) Currently message is set to error type value. Message field is not used in error logs. it is used only in the case of info logs. This PR sets error message field to store error type correctly. --- cmd/logger/logger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/logger/logger.go b/cmd/logger/logger.go index 87e0920df..362df5c13 100644 --- a/cmd/logger/logger.go +++ b/cmd/logger/logger.go @@ -343,7 +343,7 @@ func logIf(ctx context.Context, err error) { entry.API.Args.Bucket = hashString(entry.API.Args.Bucket) entry.API.Args.Object = hashString(entry.API.Args.Object) entry.RemoteHost = hashString(entry.RemoteHost) - entry.Message = reflect.TypeOf(err).String() + entry.Trace.Message = reflect.TypeOf(err).String() entry.Trace.Variables = make(map[string]string) }