-
Notifications
You must be signed in to change notification settings - Fork 26
Make ksdump output only JSON on success #56
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
Comments
Weird, this may have something to do with the fact that you're running I know for sure that at least when you clone https://github.com/kaitai-io/kaitai_struct_visualizer and run |
Ah yeap your correct, tried in a shell inside the container and log messages end up on stderr 👍 tricky i was pretty sure docker can separate them from working the daemon API, and it turned out without Would it still make sense to silence logs to stderr on success and only print things if some verbose flag is used? |
Yes, it does. It's a bit ironic that I don't like this default quiet mode of KSC: But this doesn't translate well to I actually think it's OK to just remove these debug logs from Yeah, and on the other hand, I'd really want |
My very subjective opinion is that is like tools that are quiet unless you tell them or something goes wrong :) but yeah in the case of ksdump it would expect such a tool to not output anything extra |
🎉 BTW sorry for little progress on the fq kaitai front. Ended up being involved in getting jq maintained again after 5 years without any release and hopefully jq 1.7 will be out soon! |
The pre-release version actually popped up in my feed recently - that's super exciting! jq is amazing for all sorts of JSON manipulation and it's easy and quick to use, but yeah, I wasn't sure whether there would be a successor of jq 1.6 after this time 😉 |
Hi, i think
ksdump -f json
would be easier to use with jq etc and be more what i would expect if only outputted JSON on stdout. Currently it also outputs some log messages on stdout making the output invalid JSON. Maybe on error it could print logs on stderr?Reproduction:
Workaround i use at the moment is to pipe thru tail
ksdump ... | tail +5 | jq ...
.If good ide I guess same would apply for XML and YAML output.
I also noticed that there is no trailing new line for the last JSON output line, making it a bit awkward in a shell.
The text was updated successfully, but these errors were encountered: