Python logging handler for PrairieLog ingestion.
Project description
PrairieLog Python Handler
Small logging.Handler for Python services. It batches records through POST /api/v1/log-events/batch, maps Python log levels to PrairieLog levels, and flushes on demand.
After registry publishing:
pip install prairielog-handler
Until then, install from this repo with pip install ./frontend/sdk/python.
import logging
from prairielog_handler import PrairieLogHandler
handler = PrairieLogHandler(
api_url="https://log-stream-service.onrender.com",
ingestion_token="YOUR_INGESTION_TOKEN",
logger_name="checkout-worker",
)
logging.getLogger().addHandler(handler)
logging.error("Payment failed", extra={"orderId": "ord_123"})
Call handler.flush() before process shutdown when you cannot rely on normal logging cleanup.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prairielog_handler-0.1.0.tar.gz.
File metadata
- Download URL: prairielog_handler-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eeb5c7aa36d9c4d8cf9ee4dd27ef82fae227b93ebcdd7c597f65c2e406ccfda
|
|
| MD5 |
b1b0196027a14d139d7037b42243eacd
|
|
| BLAKE2b-256 |
9325d2c12d5ced1afe751673bdc5c44e12dc223b53c5d25dbbaf76cdecbb12f5
|
File details
Details for the file prairielog_handler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prairielog_handler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22900affdf37cba8939fbe814181f430438d901ba0668668f5519515e92bac43
|
|
| MD5 |
ad6a4f1fd0a2a5107344302ddd5b8510
|
|
| BLAKE2b-256 |
e8037de271a556358e970e8309fbae004692aa708a6a04f71109810de92f528e
|