aboutsummaryrefslogtreecommitdiff
path: root/internal/context
diff options
context:
space:
mode:
Diffstat (limited to 'internal/context')
-rw-r--r--internal/context/api.go4
-rw-r--r--internal/context/context.go4
-rw-r--r--internal/context/notice.go8
3 files changed, 8 insertions, 8 deletions
diff --git a/internal/context/api.go b/internal/context/api.go
index 220ab340..153997d3 100644
--- a/internal/context/api.go
+++ b/internal/context/api.go
@@ -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{
diff --git a/internal/context/context.go b/internal/context/context.go
index 95c3ce10..de70e75c 100644
--- a/internal/context/context.go
+++ b/internal/context/context.go
@@ -17,8 +17,8 @@ import (
"github.com/go-macaron/i18n"
"github.com/go-macaron/session"
"github.com/unknwon/com"
- log "gopkg.in/clog.v1"
"gopkg.in/macaron.v1"
+ log "unknwon.dev/clog/v2"
"gogs.io/gogs/internal/auth"
"gogs.io/gogs/internal/db"
@@ -173,7 +173,7 @@ func (c *Context) Handle(status int, msg string, err error) {
c.Data["Title"] = "Page Not Found"
case http.StatusInternalServerError:
c.Data["Title"] = "Internal Server Error"
- log.Error(3, "%s: %v", msg, err)
+ log.Error("%s: %v", msg, err)
if !setting.ProdMode || (c.IsLogged && c.User.IsAdmin) {
c.Data["ErrorMsg"] = err
}
diff --git a/internal/context/notice.go b/internal/context/notice.go
index 16b9440f..dea72043 100644
--- a/internal/context/notice.go
+++ b/internal/context/notice.go
@@ -9,7 +9,7 @@ import (
"path"
"github.com/unknwon/com"
- log "gopkg.in/clog.v1"
+ log "unknwon.dev/clog/v2"
"gogs.io/gogs/internal/markup"
"gogs.io/gogs/internal/setting"
@@ -26,14 +26,14 @@ func (c *Context) renderNoticeBanner() {
f, err := os.Open(fpath)
if err != nil {
- log.Error(2, "Failed to open file %q: %v", fpath, err)
+ log.Error("Failed to open file %q: %v", fpath, err)
return
}
defer f.Close()
fi, err := f.Stat()
if err != nil {
- log.Error(2, "Failed to stat file %q: %v", fpath, err)
+ log.Error("Failed to stat file %q: %v", fpath, err)
return
}
@@ -48,7 +48,7 @@ func (c *Context) renderNoticeBanner() {
buf := make([]byte, maxSize)
n, err := f.Read(buf)
if err != nil {
- log.Error(2, "Failed to read file %q: %v", fpath, err)
+ log.Error("Failed to read file %q: %v", fpath, err)
return
}
buf = buf[:n]