diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-03-22 23:12:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 11:12:55 -0400 |
commit | c61b902538e8e4b2bb83136f190e044a6bbcdd9b (patch) | |
tree | bc08142f5ced69721ab14793b8dc62aa83314268 /models/log.go | |
parent | dcaa5643d70cd1be72e53e82a30d2bc6e5f8de92 (diff) | |
download | gitea-c61b902538e8e4b2bb83136f190e044a6bbcdd9b.tar.gz gitea-c61b902538e8e4b2bb83136f190e044a6bbcdd9b.zip |
Upgrade xorm to v1.0.0 (#10646)
* Upgrade xorm to v1.0.0
* small nit
* Fix tests
* Update xorm
* Update xorm
* fix go.sum
* fix test
* Fix bug when dump
* Fix bug
* update xorm to latest
* Fix migration test
* update xorm to latest
* Fix import order
* Use xorm tag
Diffstat (limited to 'models/log.go')
-rw-r--r-- | models/log.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/models/log.go b/models/log.go index 4caea9a8b7..1cfddd90a1 100644 --- a/models/log.go +++ b/models/log.go @@ -9,7 +9,7 @@ import ( "code.gitea.io/gitea/modules/log" - "xorm.io/core" + xormlog "xorm.io/xorm/log" ) // XORMLogBridge a logger bridge from Logger to xorm @@ -19,7 +19,7 @@ type XORMLogBridge struct { } // NewXORMLogger inits a log bridge for xorm -func NewXORMLogger(showSQL bool) core.ILogger { +func NewXORMLogger(showSQL bool) xormlog.Logger { return &XORMLogBridge{ showSQL: showSQL, logger: log.GetLogger("xorm"), @@ -72,22 +72,22 @@ func (l *XORMLogBridge) Warnf(format string, v ...interface{}) { } // Level get logger level -func (l *XORMLogBridge) Level() core.LogLevel { +func (l *XORMLogBridge) Level() xormlog.LogLevel { switch l.logger.GetLevel() { case log.TRACE, log.DEBUG: - return core.LOG_DEBUG + return xormlog.LOG_DEBUG case log.INFO: - return core.LOG_INFO + return xormlog.LOG_INFO case log.WARN: - return core.LOG_WARNING + return xormlog.LOG_WARNING case log.ERROR, log.CRITICAL: - return core.LOG_ERR + return xormlog.LOG_ERR } - return core.LOG_OFF + return xormlog.LOG_OFF } // SetLevel set the logger level -func (l *XORMLogBridge) SetLevel(lvl core.LogLevel) { +func (l *XORMLogBridge) SetLevel(lvl xormlog.LogLevel) { } // ShowSQL set if record SQL |