From 941f746767227ae0f4de52272166caaab3462882 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 30 Sep 2020 10:04:49 -0700 Subject: [PATCH] Record stacktraces when logging errors in gitea Gitea has added a STACKTRACE_LEVEL config option to set which log level will also generate stack traces when logging. We want them for at least Error and above so set this to Error for now. In particular there seems to be a commit cache issue which results in errors that having stack traces for would be helpful to debug. Change-Id: I0491373ef143dfa753c011d02e3c670c699d2a52 --- playbooks/roles/gitea/templates/app.ini.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/roles/gitea/templates/app.ini.j2 b/playbooks/roles/gitea/templates/app.ini.j2 index 30786fd3e1..c3e0cc6d6c 100644 --- a/playbooks/roles/gitea/templates/app.ini.j2 +++ b/playbooks/roles/gitea/templates/app.ini.j2 @@ -52,6 +52,7 @@ PATH = /data/gitea/attachments [log] ROOT_PATH = /logs LEVEL = Info +STACKTRACE_LEVEL = Error ENABLE_ACCESS_LOG = true {% raw %} ACCESS_LOG_TEMPLATE = {{.Ctx.Req.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"