Xshell allows you to log the entire transcript of a session to a file. Also a protocol tracing feature is available for debugging purposes.