improved the logging code in the socket session classes
Merge pull request #1 from kerryjiang/master

update