title: How to create logging system in my program?
body: <p>I was writing program when suddenly wild thought appear: What is the best way to create log system in my program? I mean how can i save logs in any place in my code (of course excluding header files)? Something like</p>
  
  <pre><code>myLogs &lt;&lt; "Ups, somthing failed :(";
  </code></pre>
  
  <p>You know, earlier i just opened file and save what i want to, but now i would like do it in a pro way :D I was thinking about class which will be inherited by all other classes but it's kind of problematic. I also thought about static function, but i'm not sure how it would work.</p>