bobbui / json-logging-python

Cloud-native distributed Python logging library to emit JSON log that can be easily indexed by logging infrastructure
Apache License 2.0
303 stars 62 forks source link

Move serialization function to the method of BaseJSONFormatter class #72

Closed rhutkovich closed 3 years ago

rhutkovich commented 3 years ago

In certain situations it's very handy to adjust serialization method preserving the rest of JSONFormetter's logic. For example replace default serialization (python's standard json lib) by some enhanced one (ujson, other).

So I moved function from global constant to the BaseJSONFormatter class' method. Also added little fix for tests to be able to run on Windows

bobbui commented 3 years ago

Thanks for your contribution.

rhutkovich commented 3 years ago

Oh, you're right. Ok, let me re-open other PR including only tests fix