Improved exception logging in Session, and cap log buffer messages to a max len