Problem:
Despite the fact that exception should be captured, when
doing so in a django request handler, gelf-formatter produces
a logging error caused by
TypeError: Object of type WSGIRequest is not JSON serializable
Solution:
This can be fixed by converting value to string for non json serialzable objects:
log_record[_prefix(key)] = str(value)
Problem: Despite the fact that exception should be captured, when doing so in a django request handler, gelf-formatter produces a logging error caused by
Solution: This can be fixed by converting value to string for non json serialzable objects:
log_record[_prefix(key)] = str(value)