Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I wanted to know if I can send all the errors that happend while my app is in 'production' environment to a new 'log' instead of sending ALL the actions to the 'production.log' send it to 'production_errors.log'.

And if it is possible, tell me how please !

Thank you very much for reading !

share|improve this question
    
Check the documentation? guides.rubyonrails.org/… –  novemberkilo Apr 16 '13 at 20:00
    
Yeap, I've checked it. But I don't really understand how to only write the erros on a new log while having a normal log too. –  Alejo Amiras Apr 16 '13 at 20:57
    
Write own logger maybe? –  hauleth Apr 16 '13 at 21:03

1 Answer 1

In config/environments/production.rb, within the configuration block:

config.logger = Logger.new(Rails.root.join(%w(log production_errors.log)), :error)
share|improve this answer
    
Error message: can't convert Array into String Exception class: TypeError –  Alejo Amiras Apr 19 '13 at 17:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.