diff options
author | zeripath <art27@cantab.net> | 2021-06-27 01:56:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 20:56:58 -0400 |
commit | 35f37a3625476fe5426c35e30e409550054c2d46 (patch) | |
tree | 7f69337df87839531a44d1d03ced902dc3754bea /routers/install | |
parent | 540215588a45464ace455507683b65f1c173ab79 (diff) | |
download | gitea-35f37a3625476fe5426c35e30e409550054c2d46.tar.gz gitea-35f37a3625476fe5426c35e30e409550054c2d46.zip |
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 <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/install')
-rw-r--r-- | routers/install/setting.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/install/setting.go b/routers/install/setting.go index 53d166ba1d..7b9b7bd8c2 100644 --- a/routers/install/setting.go +++ b/routers/install/setting.go @@ -18,11 +18,11 @@ import ( func PreloadSettings(ctx context.Context) bool { setting.NewContext() if !setting.InstallLock { - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) - log.Trace("Preparing to run install page") + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) + log.Info("Preparing to run install page") translation.InitLocales() if setting.EnableSQLite3 { log.Info("SQLite3 Supported") |