This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/cmd
zeripath 1bf40ca0df
Gitea serv, hooks, manager and the like should always display Fatals (#13032)
The gitea cmd/serv.go setup function deletes the console logger to
prevent stdout interference with commands. However, the problem is that
it then calls setting.NewContext which may cause an exit with log.Fatal
- which will then not be shown.

Now, log.Fatal is so disastrous that the interference that logging
causes is wanted. However, we can avoid stdout interference by emitting
on stderr.

This PR forces the creation of a console logger on stderr listening on
Fatal for these commands. Most commands have a `--debug` option now that
will print more reasons too - however, defaulting to give the log for
Fatal seems reasonable.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-07 16:44:16 -04:00
..
admin.go Check passwords against HaveIBeenPwned (#12716) 2020-09-08 17:06:39 -05:00
admin_auth_ldap.go
admin_auth_ldap_test.go
cert.go
cmd.go
convert.go
doctor.go Add command to recreate tables (#12407) 2020-09-06 22:52:01 +01:00
dump.go Add default storage configurations (#12813) 2020-09-29 12:05:13 +03:00
embedded.go
embedded_stub.go
generate.go TrimSpace when reading InternalToken from a file (#11502) 2020-05-20 19:16:06 +03:00
hook.go Rename models.ProtectedBranchRepoID to models.EnvRepoID and ensure EnvPusherEmail is set (#12646) 2020-08-30 08:24:39 +01:00
keys.go
manager.go Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777) 2020-07-05 20:07:07 -04:00
migrate.go
migrate_storage.go Add default storage configurations (#12813) 2020-09-29 12:05:13 +03:00
serv.go Gitea serv, hooks, manager and the like should always display Fatals (#13032) 2020-10-07 16:44:16 -04:00
web.go Refactor use TrimSuffix instead of TrimRight (#12993) 2020-10-01 06:54:34 +01:00
web_graceful.go