Logging with the daemons gem


#1

I am trying to leverage the daemons gem but I am confused about the
proper way to set up logging. I am able pass options which configure
stdout to go to a log file but it seems like all calls to Rails.logger
are disabled as I see the following message in my output:

usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/buffered_logger.rb:99:in write': closed stream (IOError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/ lib/active_support/buffered_logger.rb:99:inflush’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/
lib/active_support/buffered_logger.rb:96:in synchronize' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/ lib/active_support/buffered_logger.rb:96:inflush’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/
lib/active_support/buffered_logger.rb:116:in `auto_flush’

This doesn’t seem right as my daemon is reusing code that makes calls
to Rails.logger. Am I missing something?

thx.


#2

Karl B. wrote:

I am trying to leverage the daemons gem but I am confused about the
proper way to set up logging. I am able pass options which configure
stdout to go to a log file but it seems like all calls to Rails.logger
are disabled as I see the following message in my output:

usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/buffered_logger.rb:99:in write': closed stream (IOError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/ lib/active_support/buffered_logger.rb:99:inflush’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/
lib/active_support/buffered_logger.rb:96:in synchronize' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/ lib/active_support/buffered_logger.rb:96:inflush’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/
lib/active_support/buffered_logger.rb:116:in `auto_flush’

This doesn’t seem right as my daemon is reusing code that makes calls
to Rails.logger. Am I missing something?

thx.

Did you get this resolved? I’m in a similar situation: Trying to use
Rails’ logger from within a daemon.

Thanks,
Chris