Fix issue with endoding transformation for logging causing a fatal error

When certain data was being passed to us JSON.generate attempts to convert the data to UTF8 and fails... with a fatal which stops the request going though. Awesome