forgejo/cmd
wxiaoguang 0eb4ab4246
Fix sub-command log level (#25537) (#25553)
Backport #25537

More fix for #24981

* #24981

Close #22361, #25552

* #22361
* #25552

There were many patches for Gitea's sub-commands to satisfy the facts:

* Some sub-commands shouldn't output any log, otherwise the git protocol
would be broken
* Sometimes the users want to see "verbose" or "quiet" outputs

That's a longstanding problem, and very fragile. This PR is only a quick
patch for the problem.

In the future, the sub-command system should be refactored to a clear
solution.

----

Other changes:

* Use `ReplaceAllWriters` to replace
`RemoveAllWriters().AddWriters(writer)`, then it's an atomic operation.
* Remove unnecessary `syncLevelInternal` calls, because
`AddWriters/addWritersInternal` already calls it.
2023-06-28 17:35:20 +08:00
..
actions.go Refactor path & config system (#25330) (#25416) 2023-06-22 16:27:18 +00:00
admin.go
admin_auth_ldap.go
admin_auth_ldap_test.go
admin_user.go
admin_user_change_password.go
admin_user_create.go
admin_user_delete.go
admin_user_generate_access_token.go
admin_user_list.go
admin_user_must_change_password.go
cert.go
cmd.go Fix sub-command log level (#25537) (#25553) 2023-06-28 17:35:20 +08:00
convert.go Support converting varchar to nvarchar for mssql database (#24105) 2023-04-17 21:22:10 +08:00
docs.go
doctor.go Fix sub-command log level (#25537) (#25553) 2023-06-28 17:35:20 +08:00
dump.go Refactor path & config system (#25330) (#25416) 2023-06-22 16:27:18 +00:00
dump_repo.go
embedded.go Refactor path & config system (#25330) (#25416) 2023-06-22 16:27:18 +00:00
generate.go
hook.go Fix sub-command log level (#25537) (#25553) 2023-06-28 17:35:20 +08:00
hook_test.go Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" (#23687) 2023-03-29 14:32:26 +08:00
keys.go Fix sub-command log level (#25537) (#25553) 2023-06-28 17:35:20 +08:00
mailer.go Refactor path & config system (#25330) (#25416) 2023-06-22 16:27:18 +00:00
main_test.go Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
manager.go Add gitea manager reload-templates command (#24843) 2023-05-22 23:51:40 +08:00
manager_logging.go Rewrite logger system (#24726) 2023-05-21 22:35:11 +00:00
migrate.go
migrate_storage.go Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
migrate_storage_test.go Fix all possible setting error related storages and added some tests (#23911) (#25244) 2023-06-14 08:36:52 +02:00
restore_repo.go Refactor path & config system (#25330) (#25416) 2023-06-22 16:27:18 +00:00
serv.go Fix sub-command log level (#25537) (#25553) 2023-06-28 17:35:20 +08:00
web.go Fix sub-command log level (#25537) (#25553) 2023-06-28 17:35:20 +08:00
web_acme.go
web_graceful.go
web_https.go