summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-31 15:03:30 +0800
committerUnknwon <u@gogs.io>2015-07-31 15:03:30 +0800
commitbdd92dc7d117d7c1ff66928ce62d4f2202358b9b (patch)
tree02c16a2ab6480284cbf913dd2a1bf864bf190712
parent4cd892c99f635919758d81479a1eed72fbe7ae5d (diff)
downloadgitea-bdd92dc7d117d7c1ff66928ce62d4f2202358b9b.tar.gz
gitea-bdd92dc7d117d7c1ff66928ce62d4f2202358b9b.zip
fix disable router log option
-rw-r--r--cmd/web.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 5e03eda51b..8a566451ea 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -98,7 +98,9 @@ func checkVersion() {
// newMacaron initializes Macaron instance.
func newMacaron() *macaron.Macaron {
m := macaron.New()
- m.Use(macaron.Logger())
+ if !setting.DisableRouterLog {
+ m.Use(macaron.Logger())
+ }
m.Use(macaron.Recovery())
if setting.EnableGzip {
m.Use(macaron.Gziper())
@@ -109,14 +111,14 @@ func newMacaron() *macaron.Macaron {
m.Use(macaron.Static(
path.Join(setting.StaticRootPath, "public"),
macaron.StaticOptions{
- SkipLogging: !setting.DisableRouterLog,
+ SkipLogging: setting.DisableRouterLog,
},
))
m.Use(macaron.Static(
setting.AvatarUploadPath,
macaron.StaticOptions{
Prefix: "avatars",
- SkipLogging: !setting.DisableRouterLog,
+ SkipLogging: setting.DisableRouterLog,
},
))
m.Use(macaron.Renderer(macaron.RenderOptions{