mirror of
https://github.com/minio/minio.git
synced 2025-05-22 18:11:50 -04:00
save deploymentID to avoid mutating request entry in Audit (#16053)
This commit is contained in:
parent
ce299b47ea
commit
bf89f79694
@ -289,8 +289,9 @@ func errToEntry(ctx context.Context, err error, errKind ...interface{}) log.Entr
|
|||||||
|
|
||||||
// Get the cause for the Error
|
// Get the cause for the Error
|
||||||
message := fmt.Sprintf("%v (%T)", err, err)
|
message := fmt.Sprintf("%v (%T)", err, err)
|
||||||
|
deploymentID := req.DeploymentID
|
||||||
if req.DeploymentID == "" {
|
if req.DeploymentID == "" {
|
||||||
req.DeploymentID = xhttp.GlobalDeploymentID
|
deploymentID = xhttp.GlobalDeploymentID
|
||||||
}
|
}
|
||||||
|
|
||||||
objects := make([]log.ObjectVersion, 0, len(req.Objects))
|
objects := make([]log.ObjectVersion, 0, len(req.Objects))
|
||||||
@ -302,7 +303,7 @@ func errToEntry(ctx context.Context, err error, errKind ...interface{}) log.Entr
|
|||||||
}
|
}
|
||||||
|
|
||||||
entry := log.Entry{
|
entry := log.Entry{
|
||||||
DeploymentID: req.DeploymentID,
|
DeploymentID: deploymentID,
|
||||||
Level: ErrorLvl.String(),
|
Level: ErrorLvl.String(),
|
||||||
LogKind: logKind,
|
LogKind: logKind,
|
||||||
RemoteHost: req.RemoteHost,
|
RemoteHost: req.RemoteHost,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user