mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
fix(logging): fixed so that router_logging = true actually logs all http requests, fixes #2902
This commit is contained in:
parent
d09bff9039
commit
e873574e8c
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user