This change introduces the serialization with basically json dumps,
falling back to repr for non-serializable object. We check the types
of the top level objects passed to the formatter, as for example
an object enclosed into dictionary passed to the logger should be a
much more rare case.
Reviewed: https:/ /review. opendev. org/679312 /git.openstack. org/cgit/ openstack/ oslo.log/ commit/ ?id=b52c8cd247e 9b185d176bfbc4c 24c5a2cb35e5be
Committed: https:/
Submitter: Zuul
Branch: master
commit b52c8cd247e9b18 5d176bfbc4c24c5 a2cb35e5be
Author: Vladyslav Drok <email address hidden>
Date: Fri Jul 20 14:17:43 2018 +0300
Serialize complex objects in FluentFormatter
This change introduces the serialization with basically json dumps,
falling back to repr for non-serializable object. We check the types
of the top level objects passed to the formatter, as for example
an object enclosed into dictionary passed to the logger should be a
much more rare case.
Closes-Bug: 1782361 1f85b6cce853057 a572ec287f6
Change-Id: Ib214f95abfadd9