title: When should a Logger flush?
body: <p>I want to know when, or how often should a Logging class flush its stream - and why? Should it flush after every log, or wait for the stream buffer to fill and then flush, or is it somewhere in between?</p>
  
  <p>To further illustrate my question:</p>
  
  <p>My logging class holds a reference to some <code>std::ostream stream</code> and uses <code>operator&lt;&lt;</code> for input. I am able to flush after every line of input, let's say by using <code>std::endl;</code> - but i don't, instead i <code>use stream &lt;&lt; "\n"</code> to just force a newline. I let flush happen when the stream buffer is full or on stream /logger destruction.</p>