Skip to content

Commit

Permalink
config to enable debug log level (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyt authored Mar 14, 2020
1 parent adf0db3 commit 121b53e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions awss3/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const (
ConfKeyARN = "arn"
// ConfKeyDisableSSL config key name of disabling ssl flag
ConfKeyDisableSSL = "disable_ssl"
// ConfKeyDebugLog config key to enable LogDebug log level
ConfKeyDebugLog = "debug_log"
// Authentication Source's

// AuthAccessKey is for using aws access key/secret pairs
Expand Down Expand Up @@ -140,6 +142,10 @@ func NewClient(conf *cloudstorage.Config) (*s3.S3, *session.Session, error) {
awsConf.WithEndpoint(conf.BaseUrl).WithS3ForcePathStyle(true)
}

if conf.Settings.Bool(ConfKeyDebugLog) {
awsConf.WithLogLevel(aws.LogDebug)
}

disableSSL := conf.Settings.Bool(ConfKeyDisableSSL)
if disableSSL {
awsConf.WithDisableSSL(true)
Expand Down

0 comments on commit 121b53e

Please sign in to comment.