From fec832402625d856aba0cc2fbdec9e773469ad87 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Sat, 22 May 2021 05:37:16 +0800 Subject: 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 Co-authored-by: techknowlogick Co-authored-by: silverwind Co-authored-by: techknowlogick --- modules/setting/setting.go | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/setting/setting.go') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 4244b55939..ec8e64578b 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -319,6 +319,7 @@ var ( DisableRouterLog bool RouterLogLevel log.Level EnableAccessLog bool + EnableSSHLog bool AccessLogTemplate string EnableXORMLog bool -- cgit v1.2.3