From 121b53e22ae80a6b0836a8dbc19b98f507350ede Mon Sep 17 00:00:00 2001 From: Sergey Todyshev Date: Sat, 14 Mar 2020 08:42:55 +0300 Subject: [PATCH] config to enable debug log level (#79) --- awss3/store.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awss3/store.go b/awss3/store.go index dee97c5..330d4f5 100644 --- a/awss3/store.go +++ b/awss3/store.go @@ -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 @@ -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)