From 4c0d55e6145f40c42c6a980f99d6929d689b308f Mon Sep 17 00:00:00 2001 From: kychen Date: Mon, 25 May 2020 15:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- registry/registry.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/registry/registry.go b/registry/registry.go index c63321d9..89692ce1 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -38,7 +38,8 @@ type Registry struct { * This passes http.DefaultTransport to WrapTransport when creating the * http.Client. */ -func New(registryURL, username, password string) (*Registry, error) { +func New(registryURL, username, password string, logFlag int) (*Registry, error) { + log.SetFlags(logFlag) transport := http.DefaultTransport return newFromTransport(registryURL, username, password, transport, Log) @@ -48,7 +49,8 @@ func New(registryURL, username, password string) (*Registry, error) { * Create a new Registry, as with New, using an http.Transport that disables * SSL certificate verification. */ -func NewInsecure(registryURL, username, password string) (*Registry, error) { +func NewInsecure(registryURL, username, password string, logFlag int) (*Registry, error) { + log.SetFlags(logFlag) transport := &http.Transport{ TLSClientConfig: &tls.Config{ // TODO: Why?