Your logging

Already logging? Keep it.

Add one handler and the logs your server already writes arrive as events: the message, the level, the fields and the exception, with the logger's name as the area. Nothing else in your code changes.

Your code, as it is

logger := slog.New(lyrelog.NewSlogHandler(
    client, &lyrelog.SlogOptions{Category: "app"}))

logger.Warn("card_declined",
    "category", "checkout",
    "brand", "visa", "attempt", 2)

What arrives in Lyrelog

{
  "level": "warning",
  "category": "checkout",
  "message": "card_declined",
  "attrs": { "brand": "visa", "attempt": 2 }
}
  • The record's message and time are the event's
  • A top-level category attribute sets the area
  • Groups become nested attributes

Secrets are hidden before anything leaves

Every SDK replaces the value of a field whose name says it's a secret: authorization, cookie, password, secret, token, API key, private key, credentials, access key, signature. At any depth of attributes and payload, before anything is cut. Try a name.

Only names are checked: a secret written into a message or an error's text is sent as it is. The list is yours to change.

"X-Api-Key": "[redacted]"

Its value never leaves your app or server.

Your levels, mapped to Lyrelog's

Lyrelog has seven: trace, debug, info, notice, warning, error and critical. Each handler maps its library's levels onto them.

Go, log/slog

Debug-4 and below is trace; between Info and Warn, notice; Error+4 and above, critical

Python, logging

DEBUG to CRITICAL, the same; below DEBUG is trace, between INFO and WARNING notice

Java, SLF4J and Logback

TRACE, DEBUG, INFO, WARN, ERROR: trace, debug, info, warning, error

Logging that never slows you down

Handlers and SDKs work the same way underneath: they queue, batch and send in the background.

  • Never in the way

    Logging returns at once; the SDK batches, compresses and sends in the background.

  • Apps keep events on disk

    Up to 20 MB and 7 days in the Swift, Android and JVM SDKs, so nothing is lost offline or when the app is killed.

  • Servers keep them in memory

    Up to 10,000 events and 16 MiB in JavaScript, Python and Go; flush before the process ends.

  • Never loops

    The Python handler and the Logback appender ignore the SDK's own logs, so they can't feed back into themselves.

For events you want to chart, prefer direct calls with a stable name: a formatted message is prose.

See it with your own app's events

Sign up with GitHub, Google or Apple. Your organization starts on Free; move it to Pro whenever you want.