mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
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>
This commit is contained in:
@@ -287,6 +287,7 @@ func newLogService() {
|
||||
|
||||
options := newDefaultLogOptions()
|
||||
options.bufferLength = Cfg.Section("log").Key("BUFFER_LEN").MustInt64(10000)
|
||||
EnableSSHLog = Cfg.Section("log").Key("ENABLE_SSH_LOG").MustBool(false)
|
||||
|
||||
description := LogDescription{
|
||||
Name: log.DEFAULT,
|
||||
|
@@ -319,6 +319,7 @@ var (
|
||||
DisableRouterLog bool
|
||||
RouterLogLevel log.Level
|
||||
EnableAccessLog bool
|
||||
EnableSSHLog bool
|
||||
AccessLogTemplate string
|
||||
EnableXORMLog bool
|
||||
|
||||
|
Reference in New Issue
Block a user