Skip to content

Commit e873574

Browse files
committed
fix(logging): fixed so that router_logging = true actually logs all http requests, fixes grafana#2902
1 parent d09bff9 commit e873574

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/middleware/logger.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222

2323
"github.com/Unknwon/macaron"
2424
"github.com/grafana/grafana/pkg/log"
25+
"github.com/grafana/grafana/pkg/setting"
2526
)
2627

2728
func Logger() macaron.Handler {
@@ -36,7 +37,9 @@ func Logger() macaron.Handler {
3637
switch rw.Status() {
3738
case 200, 304:
3839
content = fmt.Sprintf("%s", content)
39-
return
40+
if !setting.RouterLogging {
41+
return
42+
}
4043
case 404:
4144
content = fmt.Sprintf("%s", content)
4245
case 500:

0 commit comments

Comments
 (0)