vendor update
This commit is contained in:
9
vendor/github.com/Microsoft/hcsshim/internal/hcs/log.go
generated
vendored
9
vendor/github.com/Microsoft/hcsshim/internal/hcs/log.go
generated
vendored
@ -7,9 +7,14 @@ func logOperationBegin(ctx logrus.Fields, msg string) {
|
||||
}
|
||||
|
||||
func logOperationEnd(ctx logrus.Fields, msg string, err error) {
|
||||
// Copy the log and fields first.
|
||||
log := logrus.WithFields(ctx)
|
||||
if err == nil {
|
||||
logrus.WithFields(ctx).Debug(msg)
|
||||
log.Debug(msg)
|
||||
} else {
|
||||
logrus.WithFields(ctx).WithError(err).Error(msg)
|
||||
// Edit only the copied field data to avoid race conditions on the
|
||||
// write.
|
||||
log.Data[logrus.ErrorKey] = err
|
||||
log.Error(msg)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user