*If* you want -logips to affect every one of these messages I'd suggest another implementation:
- Define a function IdenfityNode or such that returns a string with either the node ID or IP, based on fLogIPs
- Use this function in all the concerned debug messages
This avoids these kinds of duplicated messages everywhere.