Tools for saving and loading log events in a structured format.
|Function||failureAsJSON||Convert a failure to a JSON-serializable data structure.|
|Function||objectLoadHook||Dictionary-to-object-translation hook for certain value types used within the logging system.|
|Function||objectSaveHook||Object-to-serializable hook for certain value types used within the logging system.|
On Python 2, we really need native strings in a variety of places; attribute names will sort of work in a __dict__, but they're subtly wrong; however, printing tracebacks relies on I/O to containers that only support bytes. This function converts _all_ native strings within a JSON-deserialized object to bytes.
|Parameters||obj||An object to convert to bytes. (type: |
|Returns||A string of UTF-8 bytes. (type: |
Object-to-serializable hook for certain value types used within the logging system.
|Parameters||pythonObject||Any object. (type: |
|Returns||If the object is one of the special types the logging system supports, a specially-formatted dictionary; otherwise, a marker dictionary indicating that it could not be serialized.|
|See Also||the |