forgejo/modules/setting
Jason Song f8e93ce423
Reminder for no more logs to console (#22282)
Even if the log mode is `file`, there are still few logs printed to the
console at the very beginning.

That's fine but confusing. Someone will think the console is the only
place to find logs, and get nothing helpful. See
https://github.com/go-gitea/gitea/issues/22274#issuecomment-1367917717.

There should be a reminder that there are no more logs to the console.

And to avoid log loss, we should add configured loggers first, then
remove console logger if there's no `console` in the mode.

Tests with `MODE = file`:

Before:
<img width="1792" alt="image"
src="https://user-images.githubusercontent.com/9418365/210079862-d591677f-347e-46ed-a548-bb2ddbb0885c.png">

After:
<img width="1792" alt="image"
src="https://user-images.githubusercontent.com/9418365/210080002-d66cc418-6888-4909-b370-d03f5986ef41.png">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2023-01-01 22:00:33 +08:00
..
attachment.go
cache.go
cors.go
cron.go
cron_test.go
database.go
database_sqlite.go
database_test.go
directory.go
federation.go
git.go
i18n.go
indexer.go
indexer_test.go
lfs.go
log.go Reminder for no more logs to console (#22282) 2023-01-01 22:00:33 +08:00
mailer.go
markup.go
migrations.go
mime_type_map.go
mirror.go
oauth2_client.go
packages.go
packages_test.go
picture.go Fix bug of DisableGravatar default value (#22296) 2023-01-01 20:19:23 +08:00
project.go
proxy.go
queue.go
repository.go Add option to prohibit fork if user reached maximum limit of repositories (#21848) 2022-12-27 15:21:14 -06:00
service.go
session.go
setting.go Add more test directory to exclude dir of air, remove watching templates from air include dir because gitea has internal mechanism (#22246) 2022-12-27 14:00:34 +08:00
setting_test.go
storage.go
storage_test.go
task.go
webhook.go