diff options
Diffstat (limited to 'modules/middleware/logger.go')
-rw-r--r-- | modules/middleware/logger.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/middleware/logger.go b/modules/middleware/logger.go index fc8e1a8115..d815b90c26 100644 --- a/modules/middleware/logger.go +++ b/modules/middleware/logger.go @@ -12,6 +12,8 @@ import ( "time" "github.com/go-martini/martini" + + "github.com/gogits/gogs/modules/base" ) var isWindows bool @@ -22,6 +24,10 @@ func init() { func Logger() martini.Handler { return func(res http.ResponseWriter, req *http.Request, ctx martini.Context, log *log.Logger) { + if !base.RouterLog { + return + } + start := time.Now() log.Printf("Started %s %s", req.Method, req.URL.Path) |