# Error with Rails.logger: closed stream (IOError)

**URL:** <https://www.ruby-forum.com/t/error-with-rails-logger-closed-stream-ioerror/169468>\
**Category:** Rails\
**Created:** [June 4, 2009, 2:29am UTC](https://www.ruby-forum.com/t/error-with-rails-logger-closed-stream-ioerror/169468 "2009-06-04T02:29:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 4, 2009, 2:29am UTC](https://www.ruby-forum.com/t/error-with-rails-logger-closed-stream-ioerror/169468/1 "2009-06-04T02:29:18Z")

</div>

Hi all.

I am creating a plugin that uses the daemons gem to run some code in the  
background. In that code, I call Rails.logger.info “message”, but  
receive the following error.

/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active\_support/buffered\_logger.rb:99:in  
`write’: closed stream (IOError)

Anyone seen this before and have any idea what’s going on?

Thanks,  
Chris
