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.
master
kannappanr 6 years ago committed by GitHub
parent 8689ec258b
commit 7154b8a568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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.Bucket = hashString(entry.API.Args.Bucket)
entry.API.Args.Object = hashString(entry.API.Args.Object) entry.API.Args.Object = hashString(entry.API.Args.Object)
entry.RemoteHost = hashString(entry.RemoteHost) 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) entry.Trace.Variables = make(map[string]string)
} }

Loading…
Cancel
Save