in reply to Copy STDOUT and STDERR to logfile and also display to screen

You might want to look into man tee if you're on a *nix system. Description: Copy standard input to each FILE, and also to standard output.

Don't know if it works w/ STDERR though...