colbygk/log4r

Log4r::Logger.add incompatible with Ruby's Logger.add?

Opened this issue · 1 comments

I have log4r working successfully in Rails 3.2.17 app running on Windows Server 2008 R2. However, when I tried starting a DelayedJob worker via rake I found it raised an error.

Basically, DelayedJob is calling logger.add (see delayed_job/lib/delayed/worker.rb line 248):

logger.add level, "#{Time.now.strftime('%FT%T%z')}: #{text}" if logger

This is valid for Ruby's Logger class (see Logger.add), however for log4r it tries to add an outputter in Log4r::Logger.add (see logger.rb line 119)

Is this expected behavior? Am I missing something?

FWIW this appears to no longer be an issue on delayedjob master, which uses .send(:level... instead.