I'm managing a Rails application on Apache using mod_passenger. I'd like Rails.logger calls to create towards the Apache error log instead of towards the application's log file in log/production.log.

How do i do that?

Inside your config/conditions/production.rb file you can include something similar to:

config.logger = Logger.new("/var/log/apache2/error.log")

Obviously your application have to have permissions to this type of file. Additionally intermixing Apache errors together with your applications logs is certainly not recommended.

This does not answer your question directly but I have just operate a little make sure STDERR.puts "meep" wound up in Apache's error log while using the mod_passenger.

Possibly then you may point config.logger at STDERR?