logging fixed
This commit is contained in:
@@ -76,7 +76,7 @@ func main() {
|
|||||||
id := c.Param("id")
|
id := c.Param("id")
|
||||||
n, code := load(c, db)
|
n, code := load(c, db)
|
||||||
if code != http.StatusOK {
|
if code != http.StatusOK {
|
||||||
c.Logger().Errorf("/%s failed (code: %d)", code)
|
c.Logger().Errorf("/%s failed (code: %d)", id, code)
|
||||||
return c.String(code, statuses[code])
|
return c.String(code, statuses[code])
|
||||||
}
|
}
|
||||||
defer incViews(n, db)
|
defer incViews(n, db)
|
||||||
@@ -110,7 +110,7 @@ func main() {
|
|||||||
id := c.Param("id")
|
id := c.Param("id")
|
||||||
n, code := load(c, db)
|
n, code := load(c, db)
|
||||||
if code != http.StatusOK {
|
if code != http.StatusOK {
|
||||||
c.Logger().Errorf("/%s/stats failed (code: %d)", code)
|
c.Logger().Errorf("/%s/stats failed (code: %d)", id, code)
|
||||||
return c.String(code, statuses[code])
|
return c.String(code, statuses[code])
|
||||||
}
|
}
|
||||||
n.prepare()
|
n.prepare()
|
||||||
@@ -125,7 +125,7 @@ func main() {
|
|||||||
id := c.Param("id")
|
id := c.Param("id")
|
||||||
n, code := load(c, db)
|
n, code := load(c, db)
|
||||||
if code != http.StatusOK {
|
if code != http.StatusOK {
|
||||||
c.Logger().Errorf("/%s/edit failed (code: %d)", code)
|
c.Logger().Errorf("/%s/edit failed (code: %d)", id, code)
|
||||||
return c.String(code, statuses[code])
|
return c.String(code, statuses[code])
|
||||||
}
|
}
|
||||||
c.Logger().Debugf("/%s/edit delivered", id)
|
c.Logger().Debugf("/%s/edit delivered", id)
|
||||||
|
|||||||
Reference in New Issue
Block a user