Logs
Ingest structured log events with @mydle/logs, search what was stored, and export within your plan retention. Quiet explorers mean no sources have sent data — not invented volume.
What you get#
Log management is push-based. Create a source (or use a project API key), send events to POST /api/logs/v1/ingest, then investigate in /app/logs. Only accepted, persisted rows appear in search, live tail, and export.
Set up, step by step#
From an empty workspace to your first searchable log in about two minutes. Logs is included on every plan.
Step 1: Open Logs
Choose Logs in the sidebar. Until a source sends events the explorer stays empty — Mydle never shows sample rows.
Step 2: Open Sources & retention
Click the gear button at the right end of the toolbar. The panel shows your retention, how much is stored, and your ingest sources.
Step 3: Create a source
Under Ingest sources, enter a name for the system that will send logs — for example
api-server— and click Create source. Use one source per service so you can filter, rotate, and revoke them independently.Step 4: Copy the token
Mydle shows the source token (
lt_…) together with a ready-to-runcurlcommand. The token is shown only once — copy it now and store it as a server-side secret, for exampleMYDLE_LOG_TOKEN. Afterwards only its prefix is listed. Rotate issues a new token and invalidates the old one; Revoke stops the source.The token is masked in this screenshot. Never put it in browser code or a public repository. Step 5: Send your first log
Send an event from your server. A
202 Acceptedresponse means it was stored.curl -X POST https://www.mydle.app/api/logs/v1/ingest \ -H "Authorization: Bearer $MYDLE_LOG_TOKEN" \ -H "Content-Type: application/json" \ -d '{"level":"error","message":"Payment provider timeout after 3 retries","service":"billing-worker","environment":"production"}'In Node.js services, use the Logs SDK instead — it batches events and redacts sensitive fields:
import { createMydleLogger } from "@mydle/logs"; const logger = createMydleLogger({ sourceToken: process.env.MYDLE_LOG_TOKEN!, service: "api", environment: "production", }); logger.info("Server listening on :8080"); await logger.flush();A project secret key (
sk_live_…, passed asapiKey) works too — see Log Sources.Step 6: See your logs arrive
Go back to Logs. New events appear in the table with their time, source, level, and message, and the volume chart above shows them by level. Turn on Live tail to follow new rows as they are stored.
Step 7: Inspect a log
Click any row to open the detail panel with the full JSON event. Click a chip such as the service or level to filter the explorer by it, or use Copy JSON to share the event.
Ingest & SDK#
Server-side SDK: createMydleLogger from @mydle/logs. Levels: trace, debug, info, warn, error, fatal, plus log, flush, and close. Default ingest path: /api/logs/v1/ingest on the product host (SDK uses an absolute product URL by default).
Authenticate with a source token (lt_…) or project secret key (sk_live_…). Never ship tokens in browser bundles.
Search & export#
Product search: GET /api/app/logs/search (session). Live tail follows newly stored rows. Export: GET /app/logs/export (session auth), clamped to plan retention.
Plans#
- Free — 50 MiB / month ingest, 1-day retention.
- Pro — 1 GiB / month ingest, 7-day retention. +1 GiB add-ons are available.
Subscriptions bought before the current package keep their original volume and retention until cancelled.
Storage#
Log entries are stored in Postgres today. Do not assume ClickHouse (or any secondary store) for customer logs.
Limitations
- Ingest stops for the rest of the month once the allowance is used; stored entries stay searchable.
- Empty until an ingest source sends accepted events.
- Correlation with traces uses stored IDs only — never timestamp joins. See Correlation.