log: migrate to unknwon.dev/clog/v2 (#5927)

* Add unknwon.dev/clog/v2

* Update all places
This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-02-20 02:25:02 +08:00
committed by GitHub
parent 422a206484
commit 1c09373b4f
71 changed files with 583 additions and 506 deletions

View File

@@ -10,8 +10,8 @@ import (
"strings"
"github.com/unknwon/paginater"
log "gopkg.in/clog.v1"
"gopkg.in/macaron.v1"
log "unknwon.dev/clog/v2"
"gogs.io/gogs/internal/setting"
)
@@ -39,7 +39,7 @@ func (c *APIContext) Error(status int, title string, obj interface{}) {
}
if status == http.StatusInternalServerError {
log.Error(3, "%s: %s", title, message)
log.Error("%s: %s", title, message)
}
c.JSON(status, map[string]string{