Add logger p2p middleware to track messages.