From 19e5983395b3a4402c69d6f0bb1cd8df76a07cfa Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 27 Jun 2021 01:56:58 +0100 Subject: [PATCH] Add --quiet and --verbose to gitea web to control initial logging (#16260) One of the repeatedly reported issues has been that gitea produces too much console logging during set up even if the console logger is turned off. Fundamentally this is due to some otherwise very helpful logging that has to occur before logging is set up. This has come to a head with the merging of #16243 where otherwise potentially helpful Trace logging in the git module now appears on the console. This PR proposes three things: 1. Change the initial default logger to Info not Trace. 2. Change the logging for the AppPath things to Info in recompense. 3. Add two new command line options to gitea web: --quiet and --verbose `gitea web -q` or `gitea web --quiet` will only log Fatal level initially. `gitea web -verbose` will log at Trace. Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- doc/usage/command-line.en-us.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/usage/command-line.en-us.md b/doc/usage/command-line.en-us.md index 40933a7b..0bc8d70f 100644 --- a/doc/usage/command-line.en-us.md +++ b/doc/usage/command-line.en-us.md @@ -46,6 +46,8 @@ Starts the server: - `--port number`, `-p number`: Port number. Optional. (default: 3000). Overrides configuration file. - `--install-port number`: Port number to run the install page on. Optional. (default: 3000). Overrides configuration file. - `--pid path`, `-P path`: Pidfile path. Optional. + - `--quiet`, `-q`: Only emit Fatal logs on the console for logs emitted before logging set up. + - `--verbose`: Emit tracing logs on the console for logs emitted before logging is set-up. - Examples: - `gitea web` - `gitea web --port 80`