mirror of
https://github.com/minio/minio.git
synced 2026-05-28 04:03:23 -04:00
fix: Fix crash when logging events and anonymous is enabled (#19313)
Events log does not have a stacktrace. So Trace is nil. Fix a crash in this case when an event is printed while anonymous logging is enabled.
This commit is contained in:
parent
55778ae278
commit
b657ffa496
1 changed files with 3 additions and 1 deletions
|
|
@ -364,7 +364,9 @@ func buildLogEntry(ctx context.Context, message string, trace []string, errKind
|
|||
entry.API.Args.Bucket = HashString(entry.API.Args.Bucket)
|
||||
entry.API.Args.Object = HashString(entry.API.Args.Object)
|
||||
entry.RemoteHost = HashString(entry.RemoteHost)
|
||||
entry.Trace.Variables = make(map[string]interface{})
|
||||
if entry.Trace != nil {
|
||||
entry.Trace.Variables = make(map[string]interface{})
|
||||
}
|
||||
}
|
||||
|
||||
return entry
|
||||
|
|
|
|||
Loading…
Reference in a new issue