async-worker / aiologger

Asynchronous logging for Python and asyncio
https://async-worker.github.io/aiologger/
MIT License
129 stars 13 forks source link

Allowed JSON customization #9

Closed zefciu closed 1 year ago

zefciu commented 2 years ago

Some software stacks are a little opinionated about the names of fields in structured logs. This Pull Requests allows to customize these names in a declarative way by subclassing the JsonFormatter or ExtendedJsonFormatter.

A new formatter called EcsExtendedJsonFormatter was added both as a PoC for this feature and as a directly usable way to get Elastic Common Schema-compliant logging.