HomePhabricator

logging: add LogPrintfCategory to log unconditionally with category

Description

logging: add LogPrintfCategory to log unconditionally with category

Summary:

logging: add LogPrintfCategory to log unconditionally with category

prefixing the output with the passed category name.

  • add documentation
  • add a unit test
  • update lint-logs.py
  • update lint-format-strings.py

logging: use LogPrintfCategory rather than a manual category

Here we update only the log messages that manually print a category.

In upcoming commits, LogPrintCategory will likely be used in many
other cases, such as to replace LogPrintf where it makes sense.

This is a backport of core#25306
Depends on D17222

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17223

Details

Provenance
Jon Atack <jon@atack.com>Authored on May 25 2022, 16:26
PiRKCommitted on Fri, Nov 29, 09:28
PiRKPushed on Fri, Nov 29, 09:28
Reviewer
Restricted Project
Differential Revision
D17223: logging: add LogPrintfCategory to log unconditionally with category
Parents
rABC63f4d84d7ed8: log: Use severity-based logging for leveldb/libevent messages, reverseā€¦
Branches
Unknown
Tags
Unknown