I am running a program under console.
It keep outputting debug messages on screen.
If do like this,
$./myProgram >> log.txt
then I cannot see the debug message on screen, all the messages are going to the log.txt.
So, how do I log the messages into log.txt and show the debug message on screen as well?
Thanks in advance.
Assuming you’re logging to stdout:
$./myProgram | tee log.txtEDIT
If you choose to log errors to
stderrthen it might be useful to call you prog like this (stderr goes to one file, stdout goes to another file and to screen):$./myProgram 2>error_log.txt | tee output_log.txt