Skip to main content
The Logs page displays log events from the routers and Postgres instances running a Neki database branch. Use its filters and search syntax to find events that occurred during a selected time range. To open the page, select a database and branch in the PlanetScale dashboard, then select Logs.

Filter logs

The Logs page provides the following controls: Selecting shards narrows the server menu to the servers in those shards. Neki routers are represented separately from shards, so selecting fewer than all shards removes routers from the server menu. To select routers, leave the shard filter set to all shards. Use the shard and server filters together when an issue appears to affect one shard or one primary or replica. The Logs page returns up to 100 events per page. Use Previous and Next to move through additional results.

Search logs

Use the search field to find text or filter structured log fields. Select the question-mark icon beside the search field to open the syntax reference.

Search for text

Enter a word to find messages containing it:
Use quotation marks to search for an exact phrase:
Exclude matching messages with NOT:
Use OR when either expression can match:

Search structured fields

Log entries contain structured fields that can be searched directly: You can combine text, field filters, level, shard, server, and time controls to narrow an investigation. PlanetScale log search uses VictoriaLogs LogsQL. The search help in the dashboard shows the syntax supported by the Logs page.

Read a log entry

The results table shows each event’s time, level, and message. Enable or disable Single line to control whether each message is displayed on one line in the table. Select an event to open its details panel. Depending on the event, the panel shows:
  • Timestamp and configured display timezone.
  • Log level.
  • Server role, when present.
  • Pod.
  • Neki shard.
  • Container.
  • Availability Zone.
  • Complete raw message.
The shard field shows the shard identifier and, when available, its customer-facing display name. Use the controls on a structured field to copy its value or add it to the current search. You can also copy the complete raw message and move to the previous or next event without closing the panel.

Export log results

The download menu operates on the results currently loaded on the page:
  • Download as CSV exports timestamp, level, message, role, container, availability zone, and pod fields.
  • Download as JSON exports the same results as structured JSON.
  • Copy JSON to clipboard copies the current results when clipboard access is available.
Narrow the shard, server, time, and search filters before exporting if you need a focused set of events.

Investigate an incident

When investigating a performance or availability problem:
  1. Match the Logs time range to the affected period in Metrics or Query Insights.
  2. Select the affected shards and servers.
  3. Start with ERROR and WARNING, then include the other levels for more context.
  4. Open a relevant event and filter by its shard, pod, role, or container.
  5. Compare events across instances to determine whether the problem is isolated or branch-wide.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.