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
kjagiello
source share