Berserk Docs
Logging

Patterns

Collapse similar log lines into templates to find dominant message types

Logging tab in Patterns view showing collapsed log templates with counts

The Patterns view collapses similar log lines into templates, making it easy to see what kinds of messages dominate your logs. Each row shows a template pattern and a count of how many log lines match it.

Under the hood, the view uses extract_log_template to collapse variable parts of log messages (timestamps, IDs, numbers) into placeholders, and log_template_hash to group matching lines efficiently. Clicking a pattern row adds a regex filter that matches that template and switches back to the log list.