These are the next two commits from #25203.
-
Add
LogPrintfCategoryto log unconditionally while prefixing the output with the passed category name. Add documentation and a unit test, and update thelint-logs.pyandlint-format-strings.pyscripts. -
Replace the log messages that manually print a category, with
LogPrintfCategory. In upcoming commits, it will likely be used in many other cases, such as to replaceLogPrintfwhere it makes sense.