How do I log terminal output to file automatically?

Primary tabs