title: How do I log output message from console in Linux?
body: <p>I am running a program under console.
  It keep outputting debug messages on screen. 
  If do like this,</p>
  
  <pre><code>$./myProgram &gt;&gt; log.txt
  </code></pre>
  
  <p>then I cannot see the debug message on screen, all the messages are going to the log.txt.</p>
  
  <p>So, how do I log the messages into log.txt and show the debug message on screen as well?</p>
  
  <p>Thanks in advance.  </p>