We have a custom serializer for the err context object, but it's producing log lines that confuse the loki log query json parser.

The log property is always set, but for error lines it appears empty. Trying to parse the log property as json fails with an error about a missing } but the real problem is the new lines... there is a closing } after the error message.