Query Language (LCQL)
The Logtrail Custom Query Language (LCQL) allows you to perform powerful, high-performance searches across millions of log entries.
Basic Syntax
Section titled “Basic Syntax”LCQL uses a “facet” system: column:operator:value.
Supported Operators
Section titled “Supported Operators”| Operator | Name | Description |
|---|---|---|
= | Equals | Exact match (Case-insensitive for text). |
!= | Not Equals | Exclude specific values. |
~ | Partial Match | Case-insensitive match using Trigram indexing. |
!~ | Not Partial | Exclude partial matches. |
@ | Full-Text | Search across actions and messages. |
>, < | Range | Used for timestamps. |
Filtering by Field
Section titled “Filtering by Field”Enums and UUIDs
Section titled “Enums and UUIDs”level=errorid="0198aa31-..."environment=productionText Search
Section titled “Text Search”action~"login*"message@"database connection"JSONB Filtering (Deep Nesting)
Section titled “JSONB Filtering (Deep Nesting)”Access nested data in actor, target, context, or metadata using dot notation.
actor.email="user@example.com"metadata.status_code=500context.request_id!=nullGrouping Logic
Section titled “Grouping Logic”Use commas to perform an “OR” search within a single field.
level=error,warn,fataltag=prod,criticalSorting
Section titled “Sorting”All results are automatically sorted by server_timestamp DESC (newest first), then by id DESC.