title: Overloading cout for logging purposes?
body: <p>I would like to define something like a new cout, which I can use to log my data:</p>
  
  <pre><code>some_type cout2( Message_type message ){
      cout &lt;&lt; message;
      logfile.save(message);
  }
  </code></pre>
  
  <p>so I will use it with</p>
  
  <pre><code>cout2 &lt;&lt; "some message" &lt;&lt; endl;
  </code></pre>
  
  <p>Up to now I was not able to find out how the code above has to look like exactly.</p>
  
  <p>Thanks for your help.</p>