Skip to content

Commit d3f9338

Browse files
authored
feat(storage): suppress AWS SDK logging with Nop logger (#15)
Add config.WithLogger(logging.Nop{}) to suppress default AWS SDK logging output when creating S3 clients. Closes: TIG-7391 Assisted-by: GLM 4.7 via Claude Code Signed-off-by: Xe Iaso <xe@tigrisdata.com>
1 parent 134cc0e commit d3f9338

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

storage.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
awsConfig "github.com/aws/aws-sdk-go-v2/config"
1313
"github.com/aws/aws-sdk-go-v2/credentials"
1414
"github.com/aws/aws-sdk-go-v2/service/s3"
15+
"github.com/aws/smithy-go/logging"
1516
)
1617

1718
const (
@@ -125,7 +126,9 @@ func New(ctx context.Context, options ...Option) (*Client, error) {
125126
creds = credentials.NewStaticCredentialsProvider(o.AccessKeyID, o.SecretAccessKey, "")
126127
}
127128

128-
cfg, err := awsConfig.LoadDefaultConfig(ctx)
129+
cfg, err := awsConfig.LoadDefaultConfig(ctx,
130+
awsConfig.WithLogger(logging.Nop{}),
131+
)
129132
if err != nil {
130133
return nil, fmt.Errorf("failed to load Tigris config: %w", err)
131134
}

0 commit comments

Comments
 (0)