Logs
Kvery records query runs according to each query's log level, so you can audit activity and troubleshoot problems. Logs are available both per query and across the whole group.
What is logged
For each logged run the log window lists Created at (when it ran), Query,
IP (the caller's address), HTTPCode (the response code it produced),
Time (the seconds the whole request took), Method, URL (a scheduled
run shows *** Schedule ***) and Cache (whether the result came from the
cache). The details of a row add Header and Body (filled at the Detailed
log levels only), Log (Show details), Referer URL and
Username. This makes it easy to answer questions like "which queries are
failing?" or "which queries are slow?"
A run that reaches the
slow-query threshold is not
marked in the log: Kvery tags its query with a _slow-query tag instead. To find
slow runs in the log, sort it by the time column.
Group logs vs. query logs
- Group log — the combined activity for every query in the group. Start here to get an overview or to find errors across the workspace.
- Query log — the activity for a single query, useful when you are debugging one specific report or API endpoint.
Editors open the group log with the Log button at the top of the Queries
list, and a query's log with the Log button of the query (in the list or in the
editor). Above the list, editors also see the group's Avg. runtime and its
Response codes counters. To see only the runs of one response code — for
example all failed (500) executions or all rejected (403) requests — click the
code in the Response codes counters (group log) or under a query's address in
the list (that query's log).
In the Log window:
- From and To set the time range, and Search loads it.
- The search box filters the listed entries; on a computer, a field under every column filters by that column (for example HTTPCode).
- Column visibility shows or hides columns.
- While the window is open, the entries of later runs are added every 5 seconds.
- Show charts adds bar charts of the listed entries: Top IPs, Top HTTP Codes, Top Referers and Top Users (the 5 most frequent values of each).
- Show details in an entry opens the Log details window with the run's steps: each executed statement or HTTP request with its response and time, and the headers and body of the HTTP requests. It lists the steps of entries logged at a Detailed level; at the Restricted levels the statements are not stored, so the window stays empty.
Both logs can be exported to CSV or Excel from the log window. The files hold the columns in the order of the window, without Log: Created at, Query, IP, HTTPCode, Time, Method, URL, Cache, Header, Body, Referer URL, Username; the Excel file has filters in its header row. Logs hold values sent by callers (for example the referer), so in the CSV file a value that a spreadsheet would run as a formula gets a leading apostrophe, as in the result export; numbers are kept as they are.
Log levels
Every query has its own log level, set in the query's settings; the group's log level is the default for the group's new queries. The levels are:
- Disabled — the query's runs are not logged.
- Restricted — runs are logged without the request details: the request headers and values, the executed statements and the data of the run's HTTP requests are left out. The URL of the request and the URL of the calling page (the referer) are kept; the responses of the steps are stored too, but without the statements Show details does not list them.
- Detailed — runs are logged with the request headers and values, the executed statements and the data of the run's HTTP requests as well.
Restricted and Detailed also come in an only success variant, which logs only runs
answered with a 2xx status, and an only error variant, which logs only runs
answered with a 4xx or 5xx status. Raise the level while debugging and lower it
for normal operation to keep logs concise.
Credentials are masked in the log: the values of password fields, of the
HTTP_X_DEVICE_ID request parameter (the device ID of the mobile app) and of the
Bearer token given to a shared query as its token parameter are replaced with
*** in the request values, in the URL of the request, in the URL of the calling
page (the referer, also in the logged Referer header), and in the executed SQL
when they are at least 4 characters long; the Authorization,
Proxy-Authorization, Cookie and X-Device-ID headers are masked. The same
masking applies to the logged data of the run's HTTP requests
(HTTP request directives and
webhooks). A run through the
MCP server or its REST API records only the parameters the
query got.
The response of each step is logged as it is, at the Restricted and the Detailed
levels alike: the number of
rows a statement returned, the message of a statement that failed, the value given
to a variable (for example the body an HTTP request answered with) and the answer
of return(). This masking does not apply to it, so keep secrets out of what your
statements answer.
Retention
The log window shows the entries of the selected time range — today by default; the date pickers offer the last 14 days — newest first, up to 5,000 entries for a query and 5,000 for the group, which keeps it fast. Entries are kept for 14 days; older entries are deleted automatically every day. Deleting a query deletes its entries at once (deleting a group deletes its queries with their logs). See Plans and limits for all operational limits.
Using logs effectively
- After publishing an API endpoint, watch the logs to confirm calls succeed and to catch authentication or parameter errors.
- Sort by the time column, and look for the
_slow-querytag on your queries, to find optimisation targets. - When a scheduled query fails, the log shows the response code and error so you can fix it.