title: Moving std::clog in source to output file
body: <p>I have a basic debug message in my code that prints a message as to what function is called. </p>
  
  <pre><code>#ifdef _DEBUG
       std::clog &lt;&lt; "message etc" &lt;&lt; std::endl;
  #endif
  </code></pre>
  
  <p>How do I redirect the output to send the message to a textfile?  </p>