As per description on phabricator, BlockUser::log() creates a log entry
and inserts it, without offering callers any way to alter it. In particular,
it is not possible to alter visibility of the entry, which already has
at least a use case (T152394).
This method is @unstable because there haven't been enough public discussion
about it. It might then become @stable or be replaced by something else (e.g.
a constructor option or a hook), at the discretion of the maintainers
of this code (viz. AHT).
Bug: T271101
Change-Id: I4ed0c828da9c79de615fd8a88e99200fe9183fad
Rather than having to do DatabaseBlock calls directly,
and then ManualLogEntry calls to facilitate logging,
let's create a BlockUser service, capable of blocking users
and logging, optionally with permission checking.
This should make blocking users easier for developers,
for instance, AbuseFilter or CheckUser can easily
benefit from this commit.
Bug: T189073
Change-Id: Ifdced735b694b85116cb0e43dadbfa8e4cdb8cab