-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why doesn't this write json to kafka? #9
Comments
Agree completely. Looking into solutions for this now. |
Any updates on this? Thanks! |
My solution was ugly Put it back into JSON. |
Could just format the template to do that yourself
Or more simply
|
This is quite likely to result in invalid JSON output, given that it does no escaping whatsoever of the data fields. |
Probably a way to escape it. Not too familiar with Go templates. |
Well, yes, I mean, that is the obvious workaround. The point of the issue, however, is why we need to do: JSON -> destructured -> JSON when we could just output the original JSON in the first place. |
We seem to be struggling with the way Logspout is designed: applying templates to Docker log objects. Interestingly, the stock raw adapter does have a |
If the message is already JSON, then I think you would just do |
I'm not sure why this doesn't write json to kafka? We basically take our nice structured log output, and destructure it.
The text was updated successfully, but these errors were encountered: