diff options
author | zeripath <art27@cantab.net> | 2019-05-11 10:13:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-11 10:13:57 +0100 |
commit | e3166744fef607c6623f48d3d53351d9553d81ba (patch) | |
tree | 935fdbc192c2b35761d7785d97487ed199d4644c | |
parent | f378cb572a73aa826a18f40c28cfcd4cd1e661fc (diff) | |
download | gitea-e3166744fef607c6623f48d3d53351d9553d81ba.tar.gz gitea-e3166744fef607c6623f48d3d53351d9553d81ba.zip |
Fix logging documentation (#6904)
* ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG
* Allow DISABLE_ROUTER_LOG to be set in the [log] section
-rw-r--r-- | docs/content/doc/advanced/logging-documentation.en-us.md | 4 | ||||
-rw-r--r-- | modules/setting/log.go | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/content/doc/advanced/logging-documentation.en-us.md b/docs/content/doc/advanced/logging-documentation.en-us.md index 3af75c0d8f..d9a21affce 100644 --- a/docs/content/doc/advanced/logging-documentation.en-us.md +++ b/docs/content/doc/advanced/logging-documentation.en-us.md @@ -66,7 +66,7 @@ multiple subloggers that will log to files. By default Macaron will log to its own go `log` instance. This writes to `os.Stdout`. You can redirect this log to a Gitea configurable logger -through setting the `ENABLE_MACARON_REDIRECT` setting in the `[log]` +through setting the `REDIRECT_MACARON_LOG` setting in the `[log]` section which you can configure the outputs of by setting the `MACARON` value in the `[log]` section of the configuration. `MACARON` defaults to `file` if unset. @@ -89,7 +89,7 @@ log using the value: `MACARON = ,` There are two types of Router log. By default Macaron send its own router log which will be directed to Macaron's go `log`, however if you -`ENABLE_MACARON_REDIRECT` you will enable Gitea's router log. You can +`REDIRECT_MACARON_LOG` you will enable Gitea's router log. You can disable both types of Router log by setting `DISABLE_ROUTER_LOG`. If you enable the redirect, you can configure the outputs of this diff --git a/modules/setting/log.go b/modules/setting/log.go index aafb4b3725..cd2c5cc8c1 100644 --- a/modules/setting/log.go +++ b/modules/setting/log.go @@ -211,6 +211,8 @@ func newAccessLogService() { func newRouterLogService() { Cfg.Section("log").Key("ROUTER").MustString("console") + // Allow [log] DISABLE_ROUTER_LOG to override [server] DISABLE_ROUTER_LOG + DisableRouterLog = Cfg.Section("log").Key("DISABLE_ROUTER_LOG").MustBool(DisableRouterLog) if !DisableRouterLog && RedirectMacaronLog { options := newDefaultLogOptions() |