Skip to content

Instantly share code, notes, and snippets.

@austra
Forked from deevis/gist:b4f71ba52067531575ca
Created October 27, 2015 14:57
Show Gist options
  • Save austra/7dc8429145d386499872 to your computer and use it in GitHub Desktop.
Save austra/7dc8429145d386499872 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