Skip to content

Commit 144a04f

Browse files
authored
Merge pull request #1221 from percona/revert-1220-PBM-1608-gcs-debug-log-levels
Revert "PBM-1608: Add config option to enable debug for GCS storage"
2 parents 4ecddf7 + df96345 commit 144a04f

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

packaging/conf/pbm-conf-reference.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@
160160
## The maximum object size that will be stored on the storage
161161
# maxObjSizeGB: 5018
162162

163-
## Enable debug trace of HTTP communication
164-
# debugTrace: true
165-
166-
167163
#--------------------Filesystem Configuration---------------------------
168164
# type:
169165
# filesystem:

pbm/storage/gcs/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ type Config struct {
1717
// https://pkg.go.dev/cloud.google.com/go/storage#Writer
1818
ChunkSize int `bson:"chunkSize,omitempty" json:"chunkSize,omitempty" yaml:"chunkSize,omitempty"`
1919
MaxObjSizeGB *float64 `bson:"maxObjSizeGB,omitempty" json:"maxObjSizeGB,omitempty" yaml:"maxObjSizeGB,omitempty"`
20-
DebugTrace bool `bson:"debugTrace,omitempty" json:"debugTrace,omitempty" yaml:"debugTrace,omitempty"`
2120

2221
Retryer *Retryer `bson:"retryer,omitempty" json:"retryer,omitempty" yaml:"retryer,omitempty"`
2322
}

pbm/storage/gcs/google_client.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77
"io"
8-
"log/slog"
98
"path"
109
"strings"
1110
"time"
@@ -50,21 +49,7 @@ func newGoogleClient(cfg *Config, l log.LogEvent) (*googleClient, error) {
5049
return nil, errors.Wrap(err, "marshal GCS credentials")
5150
}
5251

53-
clOpts := []option.ClientOption{
54-
option.WithCredentialsJSON(creds),
55-
}
56-
if cfg.DebugTrace {
57-
h := slog.NewTextHandler(l.GetLogger(), &slog.HandlerOptions{
58-
Level: slog.LevelDebug,
59-
})
60-
gcsLogger := slog.New(h)
61-
clOpts = append(clOpts, option.WithLogger(gcsLogger))
62-
}
63-
64-
cli, err := storagegcs.NewClient(
65-
ctx,
66-
clOpts...,
67-
)
52+
cli, err := storagegcs.NewClient(ctx, option.WithCredentialsJSON(creds))
6853
if err != nil {
6954
return nil, errors.Wrap(err, "new GCS client")
7055
}

0 commit comments

Comments
 (0)