Extract error information from rails log files

I develop 5 different rail projects, as well as refactoring some (transition from older rails to 2.3). What is the best way to extract error information from log files, so I can see all warnings about depreciation, runtime errors, etc., so I can work on improving the code base?

Are there any services or libraries that you can recommend that actually help with rails log handling?

+7
ruby-on-rails logging logfile-analysis
source share
3 answers

Check out the grep linux grep .

http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/

I donโ€™t know what error log format is in Rails, but I invite each line with a warning or error to contain the word โ€œwarningโ€ or โ€œerrorโ€.

Then it will be like this:

grep -E "error|warning" logfile.txt

for bot errors and warnings

grep "error" logfile.txt

for mistakes

grep "warning" logfile.txt

for warnings

and if you want to see new errors and warnings in real time, try this

tail -f logfile.txt | grep -E "error|warning"

tail -f logfile.txt | grep "error"

tail -f logfile.txt | grep "warning"

I hope I can help you;) and I hope that I am not mistaken about the format of magazines in Rails

+7
source share

I found the request-log-analyzer project very useful.

You can copy the log to find errors and upload them, but it is a great job to collect all the information about the various actions and the duration of their use.

Here is an approximate conclusion .

This is the first thing I launch when I receive a call saying: "My site is slow and I need help to fix it."

Hoptoad and / or Exceptional are great for current errors, but they don't track log start requests. Something like New Relic is good for this.

+3
source share

I use hoptoadapp, http://www.hoptoadapp.com/pages/home has a free taste, it logs your error messages in its database, and they provide an easy to use interface. All you have to do is install this plugin: http://github.com/thoughtbot/hoptoad_notifier .

This does not help for past errors, but is great for isolating problems with the current application launch.

+1
source share

All Articles