1
0

Improve logging handling (#57)

This commit is contained in:
konrad
2019-01-25 11:40:54 +00:00
committed by Gitea
parent d0fa9ddaec
commit 9e635ea54e
162 changed files with 29650 additions and 5877 deletions

View File

@ -18,7 +18,6 @@ package handler
import (
"code.vikunja.io/web"
"github.com/labstack/echo"
"github.com/op/go-logging"
"net/http"
"strconv"
)
@ -46,7 +45,7 @@ func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
}
pageNumber, err := strconv.Atoi(page)
if err != nil {
ctx.Get("LoggingProvider").(*logging.Logger).Error(err.Error())
getLogger(ctx).Error(err.Error())
return echo.NewHTTPError(http.StatusBadRequest, "Bad page requested.")
}
if pageNumber < 0 {