Hacker News new | ask | show | jobs
by liveoneggs 334 days ago
{ "timestamp": "2025-07-21 11:31:52", "event": "user-login", ... }, { "event": 7521, "event-type": "error-code-2025" }, { "message": Traceback (most recent call last): File "<python-input-1>", line 6, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ File "<python-input-1>", line 10, in bright_side_of_life return t[5] ~^^^ IndexError: tuple index out of range }, { "timestamp": "1753112562", "event": "user-click", ... },
2 comments

For Python I like structlog which has a feature for including exception info in a readable form: https://www.structlog.org/en/stable/exceptions.html
logfmt > json IMO

For Python users, there's a "logfmter" package which is enormously more straightforward than the popular "structlog" one.