improved the logging code in the socket session classes