aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-02 02:28:23 +0800
committerGitHub <noreply@github.com>2023-08-01 18:28:23 +0000
commit54c28fddd8a407c3ddea81923bb2978c33ef020d (patch)
tree3bc9b879744ad2939be433ba0e561a4ac6fb0e31 /modules
parentb1089bdafef1dfb62ecbac99665ac7f7fd5eddce (diff)
downloadgitea-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.go2
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)
}
}