From 5b0de9a36e7706e6cc1e71b68bdff02c10e5cf1c Mon Sep 17 00:00:00 2001 From: Wenkai Yin Date: Wed, 23 Mar 2016 13:41:05 +0800 Subject: [PATCH] mv log to utils --- main.go | 4 ++-- {log => utils/log}/formatter.go | 0 {log => utils/log}/level.go | 0 {log => utils/log}/logger.go | 0 {log => utils/log}/record.go | 0 {log => utils/log}/textformatter.go | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename {log => utils/log}/formatter.go (100%) rename {log => utils/log}/level.go (100%) rename {log => utils/log}/logger.go (100%) rename {log => utils/log}/record.go (100%) rename {log => utils/log}/textformatter.go (100%) diff --git a/main.go b/main.go index 6b79f066a..60d36bfd1 100644 --- a/main.go +++ b/main.go @@ -18,7 +18,7 @@ package main import ( "fmt" - log "github.com/vmware/harbor/log" + log "github.com/vmware/harbor/utils/log" _ "github.com/vmware/harbor/auth/db" _ "github.com/vmware/harbor/auth/ldap" @@ -39,7 +39,7 @@ func updateInitPassword(userID int, password string) error { queryUser := models.User{UserID: userID} user, err := dao.GetUser(queryUser) if err != nil { - return fmt.Errorf("Failed to get user, userID: %d", userID) + return fmt.Errorf("Failed to get user, userID: %d %v", userID, err) } if user == nil { return fmt.Errorf("User id: %d does not exist.", userID) diff --git a/log/formatter.go b/utils/log/formatter.go similarity index 100% rename from log/formatter.go rename to utils/log/formatter.go diff --git a/log/level.go b/utils/log/level.go similarity index 100% rename from log/level.go rename to utils/log/level.go diff --git a/log/logger.go b/utils/log/logger.go similarity index 100% rename from log/logger.go rename to utils/log/logger.go diff --git a/log/record.go b/utils/log/record.go similarity index 100% rename from log/record.go rename to utils/log/record.go diff --git a/log/textformatter.go b/utils/log/textformatter.go similarity index 100% rename from log/textformatter.go rename to utils/log/textformatter.go