Aggregate log frequency by level.
Section: Logs and Reporting
Count logs by level
bash
bash
cat app.log | jq -s 'group_by(.level) | map({level: .[0].level, count: length})'Explanation
Useful for operational summaries and postmortems.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Logs and Reporting