This is an alternative to #34293, but aims to address the remaining logging inconsistencies more broadly.
It extends the example fixed there to every instance, restores the original separator behavior, applies it consistently via a single helper, and adds tests for logips (covering both current and new behavior).
Problem
After #28521 centralized peer address logging into CNode::LogIP(), the original comma separator before peeraddr= was lost, resulting in inconsistent formatting across net (and recent private broadcast) logs.
Some lines also had double spaces, empty fields, or mismatched format specifiers.
Fix
Introduces CNode::LogPeer(bool) which always emits peer=<id> and, when -logips=1, appends , peeraddr=<addr>. This eliminates hand-rolled separators and makes peer identification predictable.
Minor issues (double spaces, empty placeholders, format specifiers) are fixed along the way in separate commits.
Reproducer
Run with -debug=net -logips=1 and observe peer log lines now show peer=<id>, peeraddr=<addr> (comma-separated). The new assertion in feature_logging.py automates this check.