Improved connection logging