mkdir ~/Documents/Logs
sudo nano /usr/bin/terminalLogging
sudo chmod 755 /usr/bin/terminalLogging
Put this into the file:
#!/bin/bash
/usr/bin/script ~/Documents/Logs/`date +%m.%d.%y-%H.%M.%S`.$$
===== Integrate with mac terminal =====
In the terminal options, set to run:
sh terminalLogging
===== About =====
man script
====== iTerm ======
Get http://iterm.sourceforge.net/
Shell > Log > Start / Stop