You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reading Structlog’s performance guide, I wondered how to integrate orjson with ecs_logging.StructlogFormatter. From what I gathered, the standard library’s json module is used in _utils.json_dumps to provide encoding for both formatters. Would you consider a configurable serializer for this project, to gain some performance? I assume the integration would be pretty straightforward, besides some minor changes in json_dumps and a new optional argument for the formatters’ initializers. If you agree, I would be happy to contribute. :)
The text was updated successfully, but these errors were encountered:
This may be interesting but before making overriding the json serializer a first class citizen I would make it possible for users to provide custom classes inherited from ours. So after making to possible to pass another serializer to json_dumps I'll just move the json_dumps call in StructlogFormatter.__call__ to an internal helper that may be overridden.
Hi,
While reading Structlog’s performance guide, I wondered how to integrate orjson with
ecs_logging.StructlogFormatter
. From what I gathered, the standard library’s json module is used in_utils.json_dumps
to provide encoding for both formatters. Would you consider a configurable serializer for this project, to gain some performance? I assume the integration would be pretty straightforward, besides some minor changes injson_dumps
and a new optional argument for the formatters’ initializers. If you agree, I would be happy to contribute. :)The text was updated successfully, but these errors were encountered: