From 1c09373b4f7dbc68154c817b4ee44bfa3b3f637c Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Thu, 20 Feb 2020 02:25:02 +0800 Subject: log: migrate to unknwon.dev/clog/v2 (#5927) * Add unknwon.dev/clog/v2 * Update all places --- internal/db/two_factor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db/two_factor.go') diff --git a/internal/db/two_factor.go b/internal/db/two_factor.go index dcc1c16c..cb539ef6 100644 --- a/internal/db/two_factor.go +++ b/internal/db/two_factor.go @@ -12,7 +12,7 @@ import ( "github.com/pquerna/otp/totp" "github.com/unknwon/com" - log "gopkg.in/clog.v1" + log "unknwon.dev/clog/v2" "xorm.io/xorm" "gogs.io/gogs/internal/db/errors" @@ -58,7 +58,7 @@ func (t *TwoFactor) ValidateTOTP(passcode string) (bool, error) { func IsUserEnabledTwoFactor(userID int64) bool { has, err := x.Where("user_id = ?", userID).Get(new(TwoFactor)) if err != nil { - log.Error(2, "IsUserEnabledTwoFactor [user_id: %d]: %v", userID, err) + log.Error("IsUserEnabledTwoFactor [user_id: %d]: %v", userID, err) } return has } -- cgit v1.2.3