Question: limit the number of stack trace lines when exception is generated in rails

Question

limit the number of stack trace lines when exception is generated in rails

Answers 1
Added at 2017-01-02 13:01
Tags
Question

Is there a way i can control the number of stack trace lines generated when a exception scenario happen in a rails application.

The reason for this is i need the stack trace but not all the lines and other reason my log file grows to a huge amount after a while.

Any help would be appreciated. Thanks.

Answers
nr: #1 dodano: 2017-01-02 15:01

There is no easy setting to adjust rails logging output, however you can create your own logger with ActiveSuppport.

Check out these links to get started.

http://rubyjunky.com/cleaning-up-rails-4-production-logging.html https://github.com/gshaw/concise_logging

Source Show
◀ Wstecz