From f54b942fd765713dc12c831111b59b85cfc03ea4 Mon Sep 17 00:00:00 2001 From: wy65701436 Date: Tue, 5 Apr 2016 02:45:47 -0700 Subject: [PATCH] fix log issue --- api/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/user.go b/api/user.go index d20ef93635..4a8101ba88 100644 --- a/api/user.go +++ b/api/user.go @@ -150,7 +150,7 @@ func (ua *UserAPI) Post() { user := models.User{Username: req.UserName, Email: req.Email, Realname: req.Realname, Password: req.Password, Comment: req.Comment} exist, err := dao.UserExists(user, "email") if err != nil { - log.Errorf("Error occurred in UserExists:", err) + log.Errorf("Error occurred in UserExists: %v", err) } if exist { ua.RenderError(http.StatusConflict, "") @@ -159,7 +159,7 @@ func (ua *UserAPI) Post() { userID, err := dao.Register(user) if err != nil { - log.Errorf("Error occurred in Register:", err) + log.Errorf("Error occurred in Register: %v", err) ua.RenderError(http.StatusInternalServerError, "Internal error.") return }