mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-29 08:55:45 +00:00
1bf40ca0df
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> |
||
---|---|---|
.. | ||
admin_auth_ldap_test.go | ||
admin_auth_ldap.go | ||
admin.go | ||
cert.go | ||
cmd.go | ||
convert.go | ||
doctor.go | ||
dump.go | ||
embedded_stub.go | ||
embedded.go | ||
generate.go | ||
hook.go | ||
keys.go | ||
manager.go | ||
migrate_storage.go | ||
migrate.go | ||
serv.go | ||
web_graceful.go | ||
web.go |