An expression filter evaluates a C# condition for each row in the active view and keeps rows where the result is true. Use it for parsed numbers, time windows, optional fields, nearby lines, and string or regex helpers.
RETURNS bool
SCOPE active view
OPEN Ctrl+Shift+F
CLI --filter-expr · --filter-expr-file
expression filter · main shapecondition
# keep only rows that match this conditionLevel == "Error"
|| Col("sc-status").AsInt32() >= 500# the same filter can use parsed time and service fieldsTimestamp >= NowUtc().AddMinutes(-15)
&& Service == "api"
Use direct identifiers for C#-safe column names. Reach for Col("name") when the schema contains spaces, dashes, or names that collide with built-ins.
Shared with Query Tabssame row helpers and built-ins
Evaluation order.
Expression filters run after the active tab has applied its source reader, profile parser, virtual columns, quick filters, highlights, and live-source behavior. The expression then decides which rows remain visible.
scope
Runs over the active view
Quick filters and profile parsing run first. The expression only decides which of the remaining rows should stay visible.
cols
Use readable field names when you can
Write Level or Service for ordinary columns. Use Col("sc-status"), Col(2), or Has("sc-status") for awkward, optional, or positional fields.
row
The original row is still available
Use RawLine, RowNumber, Timestamp, TotalRows, and TotalCols when the parsed columns are not enough.
nav
Check nearby lines when context matters
Line(rowNumber) and Lines(start, end) let a filter look at previous or nearby rows without preprocessing the log.
helpers
Common log checks are built in
String, regex, numeric, time, and network helpers cover the usual cases: Contains, RegexIsMatch, ParseDouble, Age, IsPrivateIp, and more.
state
The filter stays with the tab
Disable it, re-enable it, reopen from recent history, duplicate the panel, or save the session without turning the filter into a throwaway shell command.
Examples.
These examples cover status checks, time windows, optional fields, previous-line guards, and proximity checks that do not fit a basic column dialog.
Use --filter-expr-file when you want the predicate in versioned text instead of inline shell quoting.
When to use expression filters.
Use the normal filter dialog for simple include/exclude rules. Use expression filters when the condition needs parsed numbers, quoted field names, helper functions, or line-to-line context.
Open, check, apply, keep the draft
Ctrl+Shift+F opens the dialog.
Check compiles without applying.
History and Ctrl+Up / Ctrl+Down walk previous expressions.
Disable keeps the text but turns the predicate off.
The CLI mirrors that flow with --filter-expr-file and --filter-expr-disable.
Use column filters first when they already solve it
Per-column filters remain the fastest way to pre-shrink the candidate set. The expression then becomes the second layer for the logic that does not map cleanly to a single column editor.
Expressions are also the row language for Query Tabs
The same row surface shows up again in derived query tabs: direct identifiers, quoted columns, line navigation, and the same helper functions.