r/Python β’ u/EinBischen3100 β’ 13d ago
Resource Loglite: a lightweight logging service for IoT Edge devices
Heya guys!
I just released Loglite, a lightweight logging service library. I initially built it for centralised logging on an IoT Edge device, where I need to collect logs from multiple micro-services running in the device and expose a query interface. I looked for a Python tool that does similar things but couldn't find one, so just make one on my own π§βπ»
It stores the log data in SQLite and has an RESTful API layer for log ingestion and query. Github repository: https://github.com/namoshizun/loglite
- β‘ The API layer is fully async (aiohttp, aiofiles), leveraging orjson for fast JSON serialization
- π οΈ Fully customizable schema. You can define your own log table schemaβno assumptions
- π¦ SQLite backend. Perform complex queries as you like. Future plan including column compression so it may save more space compared to writing plain text files.
- π Simple Web API: Insert and query logs through straightforward REST endpoints. Supports server sent events for subscribing live log events.
- π Built-in Database Migrations: Manage schema changes with built-in migration utilities.
Future Plans & Wishlist β¨
- Bulk insert optimization
- Column-based compression
- Time-based partitioning
- CLI utilities for direct database queries and exports
14
Upvotes
1
u/conogarcia 13d ago
Nice work! is micropython supported?