Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added some debugging logs #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions internal/backend_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ func (s *S3Backend) Init(key string) error {
}

func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, string, error) {
s3Log.Debugf("MATHIS TEST: params %v, backend %v", params, s)
if s.aws {
req, resp := s.S3.ListObjectsV2Request(params)
err := req.Send()
Expand All @@ -313,7 +314,7 @@ func (s *S3Backend) ListObjectsV2(params *s3.ListObjectsV2Input) (*s3.ListObject
if err != nil {
return nil, "", err
}

s3Log.Debugf("MATHIS TEST: objs %v, err %v", objs, err)
count := int64(len(objs.Contents))
v2Objs := s3.ListObjectsV2Output{
CommonPrefixes: objs.CommonPrefixes,
Expand Down Expand Up @@ -388,7 +389,7 @@ func (s *S3Backend) HeadBlob(param *HeadBlobInput) (*HeadBlobOutput, error) {

func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) {
var maxKeys *int64

s3Log.Debugf("MATHIS TEST")
if param.MaxKeys != nil {
maxKeys = aws.Int64(int64(*param.MaxKeys))
}
Expand All @@ -401,6 +402,7 @@ func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) {
StartAfter: param.StartAfter,
ContinuationToken: param.ContinuationToken,
})
s3Log.Debugf("MATHIS TEST: resp %v, reqid %v, err %v", resp, reqId, err)
if err != nil {
return nil, mapAwsError(err)
}
Expand All @@ -420,12 +422,12 @@ func (s *S3Backend) ListBlobs(param *ListBlobsInput) (*ListBlobsOutput, error) {
StorageClass: i.StorageClass,
})
}

s3Log.Debugf("MATHIS TEST: prefixes %v, items %v", prefixes, items)
return &ListBlobsOutput{
Prefixes: prefixes,
Items: items,
NextContinuationToken: resp.NextContinuationToken,
IsTruncated: *resp.IsTruncated,
IsTruncated: false, //forcing false to test
RequestId: reqId,
}, nil
}
Expand Down
Loading