Skip to content

Instantly share code, notes, and snippets.

@deevis
Created February 24, 2015 19:35
Show Gist options
  • Save deevis/b4f71ba52067531575ca to your computer and use it in GitHub Desktop.
Save deevis/b4f71ba52067531575ca to your computer and use it in GitHub Desktop.
Get list of users with occurrence count who had a certain type of error occur
for request in `grep -e "undefined local variable or method .*html_safe" log/production.log -B 1 | grep FATAL | sed 's/.*FATAL.*\[\(.*\)\]/\1/g'`;do grep "$request" log/production.log | head -n 20 | grep current_user;done | sed 's/.*current_user\(.*\).*/\1/g' | sort | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment