forked from TrueCloudLab/frostfs-node
[#1437] node: Use ctx for logging
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c16dae8b4d
commit
6db46257c0
157 changed files with 764 additions and 713 deletions
|
@ -91,7 +91,7 @@ func (s *Service) get(ctx context.Context, prm RequestParameters) error {
|
|||
}
|
||||
|
||||
func (exec *request) execute(ctx context.Context) {
|
||||
exec.log.Debug(logs.ServingRequest)
|
||||
exec.log.Debug(ctx, logs.ServingRequest)
|
||||
|
||||
// perform local operation
|
||||
exec.executeLocal(ctx)
|
||||
|
@ -103,23 +103,23 @@ func (exec *request) analyzeStatus(ctx context.Context, execCnr bool) {
|
|||
// analyze local result
|
||||
switch exec.status {
|
||||
case statusOK:
|
||||
exec.log.Debug(logs.OperationFinishedSuccessfully)
|
||||
exec.log.Debug(ctx, logs.OperationFinishedSuccessfully)
|
||||
case statusINHUMED:
|
||||
exec.log.Debug(logs.GetRequestedObjectWasMarkedAsRemoved)
|
||||
exec.log.Debug(ctx, logs.GetRequestedObjectWasMarkedAsRemoved)
|
||||
case statusVIRTUAL:
|
||||
exec.log.Debug(logs.GetRequestedObjectIsVirtual)
|
||||
exec.log.Debug(ctx, logs.GetRequestedObjectIsVirtual)
|
||||
exec.assemble(ctx)
|
||||
case statusOutOfRange:
|
||||
exec.log.Debug(logs.GetRequestedRangeIsOutOfObjectBounds)
|
||||
exec.log.Debug(ctx, logs.GetRequestedRangeIsOutOfObjectBounds)
|
||||
case statusEC:
|
||||
exec.log.Debug(logs.GetRequestedObjectIsEC)
|
||||
exec.log.Debug(ctx, logs.GetRequestedObjectIsEC)
|
||||
if exec.isRaw() && execCnr {
|
||||
exec.executeOnContainer(ctx)
|
||||
exec.analyzeStatus(ctx, false)
|
||||
}
|
||||
exec.assembleEC(ctx)
|
||||
default:
|
||||
exec.log.Debug(logs.OperationFinishedWithError,
|
||||
exec.log.Debug(ctx, logs.OperationFinishedWithError,
|
||||
zap.Error(exec.err),
|
||||
)
|
||||
var errAccessDenied *apistatus.ObjectAccessDenied
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue