diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-14 01:59:07 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-14 01:59:07 -0400 |
commit | 1ce17cce764b5c10feeba5a92586be9a45173e26 (patch) | |
tree | 6c9ecbe028443258f10dc0e87026b8f765146bdc /modules | |
parent | 15f8bc417e2b5683e2cd578c9c50f51acfd3daba (diff) | |
download | gitea-1ce17cce764b5c10feeba5a92586be9a45173e26.tar.gz gitea-1ce17cce764b5c10feeba5a92586be9a45173e26.zip |
Add log.handle
Diffstat (limited to 'modules')
-rw-r--r-- | modules/log/log.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/log/log.go b/modules/log/log.go index f71be7c133..b3a3e0a63c 100644 --- a/modules/log/log.go +++ b/modules/log/log.go @@ -6,6 +6,8 @@ package log import ( + "fmt" + "github.com/martini-contrib/render" "github.com/gogits/logs" @@ -40,8 +42,8 @@ func Critical(format string, v ...interface{}) { logger.Critical(format, v...) } -func Handle(status int, title, tmpl string, data base.TmplData, r render.Render, err error) { +func Handle(status int, title string, data base.TmplData, r render.Render, err error) { data["ErrorMsg"] = err Error("%s: %v", title, err) - r.HTML(status, tmpl, data) + r.HTML(status, fmt.Sprintf("status/%d", status), data) } |