mirror of
https://github.com/minio/minio.git
synced 2025-01-12 23:43:22 -05: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
@ -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 New Issue
Block a user