title: Redirecting standard output to syslog
body: <p>I'm planning to package <a href="http://opentibia.svn.sf.net/svnroot/opentibia/otserv/trunk/" rel="noreferrer">OpenTibia Server</a> for Debian. One of the things I want to do is add startup via <code>/etc/init.d</code> and daemonization of the <code>otserv</code> process.</p>
  
  <p>Thing is, we should probably redirect output to syslog. This is usually done via the <code>syslog()</code> function. Currently, the code is swarmed with:</p>
  
  <pre><code>std::cout &lt;&lt; "Stuff to printout" &lt;&lt; std::endl;
  </code></pre>
  
  <p>Is there a proper, easy to add, way to redirect standard output and standard error output into syslog without replacing every single "call" to std::cout and friends? </p>