Skip to content

Commit

Permalink
添加日志格式设置
Browse files Browse the repository at this point in the history
  • Loading branch information
kychen committed May 25, 2020
1 parent cbd7e19 commit 4c0d55e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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?
Expand Down

0 comments on commit 4c0d55e

Please sign in to comment.