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.
# keep only rows that match this condition Level == "Error" || Col("sc-status").AsInt32() >= 500 # the same filter can use parsed time and service fields Timestamp >= NowUtc().AddMinutes(-15) && Service == "api"
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.
These examples cover status checks, time windows, optional fields, previous-line guards, and proximity checks that do not fit a basic column dialog.
Level == "Error" || Col("sc-status").AsInt32() >= 500
Timestamp >= NowUtc().AddMinutes(-15) && Service == "api"
Has("s-port") && Col("s-port") == "80" && Contains(Message, "listen")
RowNumber > 1 && Line(RowNumber - 1) .Col("Marker") == "BEGIN"
Lines(RowNumber - 5, RowNumber - 1) .Any(line => line.Col("Status") == "500")
!IsPrivateIp(Ip) && RegexIsMatch(RawLine, "POST|PUT")
logace ./app.log \ --filter-expr "Level == \"Error\"" logace ./access.log \ --filter-expr "Col(\"sc-status\").AsInt32() >= 500" logace ./app.log \ --filter-expr-disable
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.
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.
The same row surface shows up again in derived query tabs: direct identifiers, quoted columns, line navigation, and the same helper functions.