You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
4 years ago
..
admin.go Check passwords against HaveIBeenPwned (#12716) 4 years ago
admin_auth_ldap.go Add restricted user filter to LDAP authentication (#10600) 4 years ago
admin_auth_ldap_test.go Add restricted user filter to LDAP authentication (#10600) 4 years ago
cert.go Add golangci (#6418) 5 years ago
cmd.go Move database settings from models to setting (#7806) 5 years ago
convert.go Move database settings from models to setting (#7806) 5 years ago
doctor.go Add command to recreate tables (#12407) 4 years ago
dump.go Add default storage configurations (#12813) 4 years ago
embedded.go Implement "embedded" command to extract static resources (#9982) 4 years ago
embedded_stub.go Implement "embedded" command to extract static resources (#9982) 4 years ago
generate.go TrimSpace when reading InternalToken from a file (#11502) 4 years ago
hook.go Rename models.ProtectedBranchRepoID to models.EnvRepoID and ensure EnvPusherEmail is set (#12646) 4 years ago
keys.go Add debug option to serv to help debug problems (#9492) 5 years ago
manager.go Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777) 4 years ago
migrate.go Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 5 years ago
migrate_storage.go Add default storage configurations (#12813) 4 years ago
serv.go Gitea serv, hooks, manager and the like should always display Fatals (#13032) 4 years ago
web.go Refactor use TrimSuffix instead of TrimRight (#12993) 4 years ago
web_graceful.go Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 5 years ago