From 97150ee1f89412c48251fa4df91bdd17fa1a2b30 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Fri, 24 Jun 2016 13:00:56 +0800 Subject: [PATCH 1/2] add insecure filed to job log --- job/replication/delete.go | 4 ++-- job/replication/transfer.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/job/replication/delete.go b/job/replication/delete.go index 8bf7813f8..1bec6378f 100644 --- a/job/replication/delete.go +++ b/job/replication/delete.go @@ -62,8 +62,8 @@ func NewDeleter(repository string, tags []string, dstURL, dstUsr, dstPwd string, dstClient: dstClient, logger: logger, } - deleter.logger.Infof("initialization completed: repository: %s, tags: %v, destination URL: %s, destination user: %s", - deleter.repository, deleter.tags, deleter.dstURL, deleter.dstUsr) + deleter.logger.Infof("initialization completed: repository: %s, tags: %v, destination URL: %s, insecure: %v, destination user: %s", + deleter.repository, deleter.tags, deleter.dstURL, deleter.insecure, deleter.dstUsr) return deleter, nil } diff --git a/job/replication/transfer.go b/job/replication/transfer.go index 09dcc7308..349026f4d 100644 --- a/job/replication/transfer.go +++ b/job/replication/transfer.go @@ -80,8 +80,8 @@ type BaseHandler struct { func InitBaseHandler(repository, srcURL, srcSecret, dstURL, dstUsr, dstPwd string, insecure bool, tags []string, logger *log.Logger) (*BaseHandler, error) { - logger.Infof("initializing: repository: %s, tags: %v, source URL: %s, destination URL: %s, destination user: %s", - repository, tags, srcURL, dstURL, dstUsr) + logger.Infof("initializing: repository: %s, tags: %v, source URL: %s, destination URL: %s, insecure: %v, destination user: %s", + repository, tags, srcURL, dstURL, insecure, dstUsr) base := &BaseHandler{ repository: repository, @@ -125,8 +125,8 @@ func InitBaseHandler(repository, srcURL, srcSecret, base.tags = tags } - base.logger.Infof("initialization completed: project: %s, repository: %s, tags: %v, source URL: %s, destination URL: %s, destination user: %s", - base.project, base.repository, base.tags, base.srcURL, base.dstURL, base.dstUsr) + base.logger.Infof("initialization completed: project: %s, repository: %s, tags: %v, source URL: %s, destination URL: %s, insecure: %v, destination user: %s", + base.project, base.repository, base.tags, base.srcURL, base.dstURL, base.insecure, base.dstUsr) return base, nil } From 6c2dc9759a1f65664623214f3ccfed336e15d533 Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Fri, 24 Jun 2016 13:57:48 +0800 Subject: [PATCH 2/2] pass variable insecure to base handler --- job/replication/transfer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/job/replication/transfer.go b/job/replication/transfer.go index 349026f4d..dd2fba546 100644 --- a/job/replication/transfer.go +++ b/job/replication/transfer.go @@ -90,6 +90,7 @@ func InitBaseHandler(repository, srcURL, srcSecret, dstURL: dstURL, dstUsr: dstUsr, dstPwd: dstPwd, + insecure: insecure, blobsExistence: make(map[string]bool, 10), logger: logger, }