Rails Logger

how to make default rails logger accessible in my custom modules,
because as I see now its available only for ActiveRecord and some
other Rails modules.

not sure if that works, but in many cases
where logger.info doesn’t work (like in rspec specs)
you can use:

I just dealt with the same problem:

from Mike Naberezny – Ruby
"From outside a controller or model, you can pass the logger instance
or access it with the constant RAILS_DEFAULT_LOGGER. "

also see:


thanks a lot guys