If you ever need to save the history of your Unix shell session, one of the easiest ways to do it is to use the script command, found in most Unix systems.
Simply provide the file name for your log as a command line parameter:
$ script /tmp/unix-session.log