fix(logging): fixed so that router_logging = true actually logs all http requests, fixes #2902

This commit is contained in:
Torkel Ödegaard 2015-10-10 17:55:15 -04:00
parent d09bff9039
commit e873574e8c

View File

@ -22,6 +22,7 @@ import (
"github.com/Unknwon/macaron" "github.com/Unknwon/macaron"
"github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/setting"
) )
func Logger() macaron.Handler { func Logger() macaron.Handler {
@ -36,7 +37,9 @@ func Logger() macaron.Handler {
switch rw.Status() { switch rw.Status() {
case 200, 304: case 200, 304:
content = fmt.Sprintf("%s", content) content = fmt.Sprintf("%s", content)
return if !setting.RouterLogging {
return
}
case 404: case 404:
content = fmt.Sprintf("%s", content) content = fmt.Sprintf("%s", content)
case 500: case 500: