title: Is there a way to redirect syslog messages to stdout?
body: <p>I have an application that can run in two modes, either with a CLI, or as a daemon.</p>
  
  <p>I am using <code>syslog()</code> for logging. However, when run in CLI mode I'd like all the logging, except those marked <code>LOG_DEBUG</code>, messages to be sent to the console instead of logged. </p>
  
  <p>I have tried to use <code>setlogmask()</code>, but that doesn't seem to redirect to console.</p>
  
  <p>What is the best way to do this?</p>