aboutsummaryrefslogtreecommitdiff
path: root/internal/db/two_factor.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-20 02:25:02 +0800
committerGitHub <noreply@github.com>2020-02-20 02:25:02 +0800
commit1c09373b4f7dbc68154c817b4ee44bfa3b3f637c (patch)
treeaeec9a80d10f9ef28f0d0b128f8a84bf3cb5bdb1 /internal/db/two_factor.go
parent422a20648466f270de195dce3bca04e977bacd13 (diff)
log: migrate to unknwon.dev/clog/v2 (#5927)
* Add unknwon.dev/clog/v2 * Update all places
Diffstat (limited to 'internal/db/two_factor.go')
-rw-r--r--internal/db/two_factor.go4
1 files changed, 2 insertions, 2 deletions
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
}