diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-20 19:41:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 19:41:25 +0800 |
commit | 5bf8d5445e3e3ec6b2be156654dcb233d78a570e (patch) | |
tree | 9a426fd03b619947b88931465c1a645540b94bfb /custom | |
parent | bbd30787d3d33fe66896c7e758e6922be459e252 (diff) | |
download | gitea-5bf8d5445e3e3ec6b2be156654dcb233d78a570e.tar.gz gitea-5bf8d5445e3e3ec6b2be156654dcb233d78a570e.zip |
Refactor Router Logger (#17308)
Make router logger more friendly, show the related function name/file/line.
[BREAKING]
This PR substantially changes the logging format of the router logger. If you use this logging for monitoring e.g. fail2ban you will need to update this to match the new format.
Diffstat (limited to 'custom')
-rw-r--r-- | custom/conf/app.example.ini | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 586c924c4a..3343af95a9 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -455,26 +455,35 @@ APP_ID = ; e.g. http://localhost:3000/ ;; Use comma to separate multiple modes, e.g. "console, file" MODE = console ;; -;; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" +;; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical" or "None", default is "Info" LEVEL = Info ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Router Logger ;; ;; Switch off the router log -;DISABLE_ROUTER_LOG= ; false +;DISABLE_ROUTER_LOG=false ;; ;; Set the log "modes" for the router log (if file is set the log file will default to router.log) ROUTER = console ;; -;; The level at which the router logs -;ROUTER_LOG_LEVEL = Info +;; The router will log different things at different levels. ;; +;; * started messages will be logged at TRACE level +;; * polling/completed routers will be logged at INFO +;; * slow routers will be logged at WARN +;; * failed routers will be logged at WARN +;; +;; The routing level will default to that of the system but individual router level can be set in +;; [log.<mode>.router] LEVEL +;; + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Access Logger (Creates log in NCSA common log format) ;; ;ENABLE_ACCESS_LOG = false +;; ;; Set the log "modes" for the access log (if file is set the log file will default to access.log) ;ACCESS = file ;; |