Converts a non-JSON object into a value that can be represented in logs.
Returned values are normalized recursively before JSON encoding.
typedef LogObjectEncoder = Object? Function(Object value);