forked from TrueCloudLab/frostfs-s3-gw
Add logging to ObjectLayer.ListBuckets
This commit is contained in:
parent
170f9b4b08
commit
dd31b28ab7
1 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-api-go/container"
|
"github.com/nspcc-dev/neofs-api-go/container"
|
||||||
"github.com/nspcc-dev/neofs-api-go/refs"
|
"github.com/nspcc-dev/neofs-api-go/refs"
|
||||||
"github.com/nspcc-dev/neofs-api-go/service"
|
"github.com/nspcc-dev/neofs-api-go/service"
|
||||||
|
@ -17,11 +19,15 @@ func (n *neofsObject) containerList(ctx context.Context) ([]refs.CID, error) {
|
||||||
|
|
||||||
err := service.SignRequestData(n.key, req)
|
err := service.SignRequestData(n.key, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
n.log.Error("could not prepare request",
|
||||||
|
zap.Error(err))
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
conn, err := n.cli.GetConnection(ctx)
|
conn, err := n.cli.GetConnection(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
n.log.Error("could not prepare client",
|
||||||
|
zap.Error(err))
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +37,8 @@ func (n *neofsObject) containerList(ctx context.Context) ([]refs.CID, error) {
|
||||||
|
|
||||||
res, err := container.NewServiceClient(conn).List(ctx, req)
|
res, err := container.NewServiceClient(conn).List(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
n.log.Error("could not list buckets",
|
||||||
|
zap.Error(err))
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue