Skip to main content

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you’ve installed the pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.

The logs command

Query recent logs for a Postgres or Neki branch. By default, the command returns up to 100 entries from the primary server over the last hour, newest first. Usage:

Available flags

--period cannot be combined with --from and --to. When you use a custom range, provide both timestamps.

Global flags

Examples

Show recent primary logs:
Show errors from the last six hours as JSON:
Filter a Neki branch to selected shards:
Query a custom time range:
Log output can contain query text and application data. Review it before sharing or attaching it to a support request.

Neki logs

Postgres logs

Need help?

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