Skip to content

Logs

Logs collect structured application events so you can search them later. Write events into a group and stream, then filter recent lines when something fails. Use this for application troubleshooting; use Query when you want SQL over retained history.

Status: Preview. See the API action reference for the full command list.

Before you start

  • Sign in with skippr login. See Cloud User Directory.
  • Ensure your policy allows the logs actions you need.

Concepts

  • A log group organizes related application logs.
  • A log stream separates emitters or ordered sequences inside a group.
  • PutLogEvents writes recent events and fans them into the observability lake.
  • FilterLogEvents reads the hot path and lake history.

Create a group and write events

Creating the log group is CLI, Terraform, CDKTF TypeScript, or CDKTF Python. Streams and event writes stay on the CLI. For provider credentials and the shared cloud provider block, see Terraform and CDKTF.

bash
skippr logs create-log-group --log-group-name /app/api
hcl
resource "cloud_log_group" "api" {
  log_group_name = "/app/api"
}
ts
import { CloudProvider, CloudLogGroup } from "@skippr/provider-cloud";

const cloud = new CloudProvider(this, "cloud", { region: "eu-central-1" });

new CloudLogGroup(this, "api", {
  logGroupName: "/app/api",
  provider: cloud,
});
python
from skippr_cdktf import CloudProvider, CloudLogGroup

cloud = CloudProvider(self, "cloud", region="eu-central-1")

CloudLogGroup(
    self,
    "api",
    log_group_name="/app/api",
    provider=cloud,
)

Then create a stream and write events:

bash
skippr logs create-log-stream --log-group-name /app/api --log-stream-name worker
skippr logs put-log-events --input - <<JSON
{
  "logGroupName": "/app/api",
  "logStreamName": "worker",
  "logEvents": [{"timestamp": 1710000000000, "message": "ready"}]
}
JSON

Filter recent events

bash
skippr logs filter-log-events --input - <<JSON
{
  "logGroupName": "/app/api",
  "logStreamName": "worker",
  "filterPattern": "ready"
}
JSON

You can also start a query or create a subscription filter. Filter log events merges recent events with lake history for your account.

Access

  • CLI: skippr logs <operation>
  • Hostname: logs.{region}.cloud.skippr.io
  • Auth: Bearer JWT or SigV4 service logs