Installation
Initialise the client
| Parameter | Default | Description |
|---|---|---|
api_key | required | Your Log Ingestor API key |
project_id | required | UUID of the project to ingest into |
source | "unknown" | Default source tag applied to every entry |
batch_size | 1 | Flush the queue when it reaches this many entries |
console | True | Mirror logs to stdout/stderr |
on_error | prints to stderr | Called with the exception when an ingest request fails |
Log methods
meta— arbitrary dict of structured fields attached to the entrytags— list of string tags for filtering in the UI
DEBUG/INFO go to stdout, WARN/ERROR go to stderr. Set console=False to suppress.
Flush and close
Standard library logging integration
extra={"meta": {...}}:
Flask integration
FastAPI / ASGI integration
method, path, status, duration_ms, ip, user_agent, and request_id for every request. Status >=500 is logged at ERROR, >=400 at WARN, others at INFO.