python-json-logger icon indicating copy to clipboard operation
python-json-logger copied to clipboard

ORJSON

Open rspadim opened this issue 4 years ago • 2 comments

How to use orjson instead standard json library? What about doing this at logging config?

rspadim avatar Jun 04 '20 14:06 rspadim

You can already choose your own encoder/serializer:

https://github.com/madzak/python-json-logger#adding-custom-object-serialization

liampauling avatar Oct 20 '20 15:10 liampauling

The problem is that orjson.dumps does not have the same keyword arguments as the ones being used here: https://github.com/madzak/python-json-logger/blob/master/src/pythonjsonlogger/jsonlogger.py#L192 it only accepts default and option as explained here: https://github.com/ijl/orjson#serialize

alexsavio avatar Mar 21 '22 00:03 alexsavio