requested to merge 4345-log-both-from-and-to-socket-in-debug-messages into 4344-enable-extraction-of-exact-local-socket-addresses
This MR renames some logging functions to better convey their role, extends one of them to enable logging both sockets that comprise each communication channel, and ensures that the exact local socket address (if available) is included in debug messages logging network traffic. Minor simplifications are also applied to the related logging function for improved code clarity.
While this MR is technically tangential to #4344/!8348, it benefits a
lot from the detailed information that !8348 enables extracting, so I
4344-enable-extraction-of-exact-local-socket-addresses the target
branch for this MR.