[connection] add logging method on connection
If we are to use this object like we currently do with session, we need to have
the logging method as a lot of code use them.
Upstream Author:
%(author)s <%(author-email)s>
Copyright:
Copyright (c) %(year)s %(author)s.
%(author-web-site)s -- mailto:%(author-email)s