Redirect all output to a single file
your_shell_script >> /path/to/logfile 2>&1
The 2>&1 bit is the part that redirects standard error to standard out, allowing you to capture both.
TextSnippets > jblomberg > shell
1159 users tagging and storing useful source code snippets
Jesse Blomberg http://imitationmonkey.com/
your_shell_script >> /path/to/logfile 2>&1