Skip to content

Commit 37312cd

Browse files
committed
debug
1 parent 6766520 commit 37312cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/grpc/services/gateway/storageprovider.go

+5
Original file line numberDiff line numberDiff line change
@@ -1396,12 +1396,14 @@ func (s *svc) statSharesFolder(ctx context.Context) (*provider.StatResponse, err
13961396
}
13971397

13981398
func (s *svc) stat(ctx context.Context, req *provider.StatRequest) (*provider.StatResponse, error) {
1399+
log := appctx.GetLogger(ctx)
13991400
providers, err := s.findProviders(ctx, req.Ref)
14001401
if err != nil {
14011402
return &provider.StatResponse{
14021403
Status: status.NewStatusFromErrType(ctx, "stat ref: "+req.Ref.String(), err),
14031404
}, nil
14041405
}
1406+
log.Debug().Interface("ref", req.Ref).Msg("calling getUniqueProviders")
14051407
providers = getUniqueProviders(providers)
14061408

14071409
resPath := req.Ref.GetPath()
@@ -1412,6 +1414,7 @@ func (s *svc) stat(ctx context.Context, req *provider.StatRequest) (*provider.St
14121414
Status: status.NewInternal(ctx, err, "error connecting to storage provider="+providers[0].Address),
14131415
}, nil
14141416
}
1417+
log.Debug().Interface("ref", req.Ref).Msg("calling Stat")
14151418
rsp, err := c.Stat(ctx, req)
14161419
if err != nil || rsp.Status.Code != rpc.Code_CODE_OK {
14171420
return rsp, err
@@ -2264,6 +2267,8 @@ func (s *svc) findProviders(ctx context.Context, ref *provider.Reference) ([]*re
22642267
return nil, errors.Wrap(err, "gateway: error getting storage registry client")
22652268
}
22662269

2270+
log := appctx.GetLogger(ctx)
2271+
log.Debug().Interface("ref", ref).Msg("calling GetStorageProviders")
22672272
res, err := c.GetStorageProviders(ctx, &registry.GetStorageProvidersRequest{
22682273
Ref: ref,
22692274
})

0 commit comments

Comments
 (0)