diff options
author | a1012112796 <1012112796@qq.com> | 2021-05-22 05:37:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 17:37:16 -0400 |
commit | fec832402625d856aba0cc2fbdec9e773469ad87 (patch) | |
tree | c752057af4d939c7a7d61d6e5817cd68da39af57 /custom | |
parent | 35b0c8aa7d97f18431db1b9079bee8ad51faf2cb (diff) | |
download | gitea-fec832402625d856aba0cc2fbdec9e773469ad87.tar.gz gitea-fec832402625d856aba0cc2fbdec9e773469ad87.zip |
add a new internal hook to save ssh log (#15787)
* add a new internal hook to save ssh log
as title, when a ssh error ocure like #15785.
only when switch ``RUN_MODE`` to dev can we
found which error is ocure. But this way is
not a good idea for production envirment.
this changes try save ssh error mesage to the
log file like other log by a new internal hook.
I think it's usefull for find error message
in production envirment. Thanks.
Signed-off-by: a1012112796 <1012112796@qq.com>
* rename and fix nit
* Update modules/private/hook.go
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'custom')
-rw-r--r-- | custom/conf/app.example.ini | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index b1fe95e6e2..f37157c3b1 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -444,6 +444,11 @@ ROUTER = console ;ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}" ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; SSH log (Creates log from ssh git request) +;; +;ENABLE_SSH_LOG = false +;; ;; Other Settings ;; ;; Print Stacktraces with logs. (Rarely helpful.) Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "None" |