title: Ruby: Logger and Daemons
body: <p>i'm using ruby 1.9.2p180 (2011-02-18 revision 30909)</p>
  
  <p>in Order to do the logging i use the logging gem.
  My program has two blocks, which are used as daemons.</p>
  
  <p>But logging from these blocks results in an error and nothing is written to the logfile:</p>
  
  <pre><code>log shifting failed. closed stream
  log writing failed. closed stream
  </code></pre>
  
  <p>Here is what happens in the code:</p>
  
  <pre><code>log = Logger.new(logbase + 'logfile.log', 'monthly')
  log.level = Logger::INFO
  
  proc = Daemons.call(options) do
    # [...]
    log.info "Any Logmessage"
    # [...]
  end
  </code></pre>
  
  <p>Any Idea, whats wrong there?</p>