Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nextab/9a0dfec260941c72a2d453dfb4b30739 to your computer and use it in GitHub Desktop.

Select an option

Save nextab/9a0dfec260941c72a2d453dfb4b30739 to your computer and use it in GitHub Desktop.
Hast du ein debug-File mit 7000 Zeilen und blickst nicht durch? Dann filtere einmal alle Duplikate (immer wieder dieselbe Meldung) aus dem File und konzentriere dich aufs Wesentliche! Rettet Developer-Leben.

Mit dem Terminal-Command:

tail -n 5000 debug.log | sed 's/^[^]]*] //' | sort | uniq -c | sort -nr

ist es möglich, nur eindeutige Zeilen ausgeben zu lassen (die Timestamps fallen vorne weg), was bedeutet, dass man wesentlich schneller debuggen kann.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment