diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-02 02:28:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-01 18:28:23 +0000 |
commit | 54c28fddd8a407c3ddea81923bb2978c33ef020d (patch) | |
tree | 3bc9b879744ad2939be433ba0e561a4ac6fb0e31 /modules | |
parent | b1089bdafef1dfb62ecbac99665ac7f7fd5eddce (diff) | |
download | gitea-54c28fddd8a407c3ddea81923bb2978c33ef020d.tar.gz gitea-54c28fddd8a407c3ddea81923bb2978c33ef020d.zip |
Clarify the logger's MODE config option (#26267)
1. Fix the wrong document (add the missing `MODE=`)
2. Add a more friendly log message to tell users to add `MODE=` in their
config
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/log.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/log.go b/modules/setting/log.go index 66206f8f4b..e404074b72 100644 --- a/modules/setting/log.go +++ b/modules/setting/log.go @@ -165,7 +165,7 @@ func loadLogModeByName(rootCfg ConfigProvider, loggerName, modeName string) (wri writerMode.WriterOption = writerOption default: if !log.HasEventWriter(writerType) { - return "", "", writerMode, fmt.Errorf("invalid log writer type (mode): %s", writerType) + return "", "", writerMode, fmt.Errorf("invalid log writer type (mode): %s, maybe it needs something like 'MODE=file' in [log.%s] section", writerType, modeName) } } |