aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-10 16:19:50 +0100
committerGitHub <noreply@github.com>2020-10-10 18:19:50 +0300
commitd65cd5677af3df5d616bf48dfd4be354e23c184f (patch)
tree1cd380ca877ec5594827a1b969c9fae5a54f6e11 /routers
parent1c523e212913cdb6fc2b0709af7f4c910d1728c8 (diff)
downloadgitea-d65cd5677af3df5d616bf48dfd4be354e23c184f.tar.gz
gitea-d65cd5677af3df5d616bf48dfd4be354e23c184f.zip
Change default log configuration (#13088)
* Change default log configuration This PR changes the install page and the docker default logging configuration to match the suggested configuration that I repeatedly end up suggesting on issues. It further improves the logging configuration docs to recommend specific instructions for how to configure logs for posting to issues. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update docs/content/doc/advanced/logging-documentation.en-us.md
Diffstat (limited to 'routers')
-rw-r--r--routers/install.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/install.go b/routers/install.go
index 028b5d3eea..a136cf44b2 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -271,6 +271,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
cfg.Section("database").Key("SSL_MODE").SetValue(setting.Database.SSLMode)
cfg.Section("database").Key("CHARSET").SetValue(setting.Database.Charset)
cfg.Section("database").Key("PATH").SetValue(setting.Database.Path)
+ cfg.Section("database").Key("LOG_SQL").SetValue("false") // LOG_SQL is rarely helpful
cfg.Section("").Key("APP_NAME").SetValue(form.AppName)
cfg.Section("repository").Key("ROOT").SetValue(form.RepoRootPath)
@@ -330,9 +331,12 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
cfg.Section("session").Key("PROVIDER").SetValue("file")
- cfg.Section("log").Key("MODE").SetValue("file")
+ cfg.Section("log").Key("MODE").SetValue("console")
cfg.Section("log").Key("LEVEL").SetValue(setting.LogLevel)
cfg.Section("log").Key("ROOT_PATH").SetValue(form.LogRootPath)
+ cfg.Section("log").Key("REDIRECT_MACARON_LOG").SetValue("true")
+ cfg.Section("log").Key("MACARON").SetValue("console")
+ cfg.Section("log").Key("ROUTER").SetValue("console")
cfg.Section("security").Key("INSTALL_LOCK").SetValue("true")
var secretKey string