madzak / python-json-logger

Json Formatter for the standard python logger
BSD 2-Clause "Simplified" License
1.7k stars 231 forks source link

Add static_fields arg to add common, fixed fields to all logs #116

Closed cosimomeli closed 2 years ago

cosimomeli commented 3 years ago

Adds the kwarg static_fields to add a dict of fields with a static value to every log entry, in case a simple descriptor is needed in a logger. This way fields can be added editing only logger configuration and no code is needed.

madzak commented 2 years ago

Thanks for the update!