-
Notifications
You must be signed in to change notification settings - Fork 455
Add structured output #228
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #228 +/- ##
=======================================
Coverage 91.39% 91.39%
=======================================
Files 178 178
Lines 17440 17440
=======================================
Hits 15939 15939
Misses 1501 1501 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
b37c6be
to
3eb47a1
Compare
I fixed the white-spaces error. |
3eb47a1
to
1c559c1
Compare
Fabrice, thanks for taking this on. I'd like to ask you to follow the coding style we use in strace, which is similar to the one used in the Linux kernel. In particular, tabs instead of spaces, |
1c559c1
to
c027a5e
Compare
c027a5e
to
c1e437b
Compare
4708ee2
to
ea60f31
Compare
Add options "-B / --structured-output FORMAT" to print the output of strace in a more parsable format. Currently, we provide "json" for JSON format and "ocaml" for OCaml format. Given the extend of modifications, we don't aim at covering all the features of strace, but only the most commonly used, and keep full textual backward compatibility. See file README-format for more information
ea60f31
to
9c05400
Compare
@ldv-alt I tried to fix most indentation problems, and rebased it on the latest version. Is there a tool that I can use to spot such problems automatically ? |
I'm not aware of such a tool although it might exist. |
https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl is the one used in the Linux kernel to check the style. |
OK, I've cherry picked those parts of the PR that could be applied without structured output itself. Also, it's crucial to find a way how to test structured output in CI. |
@lefessan, are you still interested in getting this PR merged? |
@lefessan gentle ping :) |
Is this abandoned ? I am very interested in JSON output and wanted to know if this feature was desired still and if I should try and merge the changes. |
Apparently, this PR is stalled for almost a year now. |
It is stalled, but my question was more about if I should try to finish the work or if the project took another direction and it was not relevant anymore. If I try and merge it, will it even be considered ? |
The topic is by no means less relevant than before, but it's still non-trivial. |
Add options "-B / --structured-output FORMAT" to print the output of strace in a more parsable format. Currently, we provide "json" for JSON format and "ocaml" for OCaml format.
Given the extend of modifications, we don't aim at covering all the features of strace, but only the most commonly used, and keep full textual backward compatibility.
JSON Format definition:
The format can be checked by putting it in a contest "[... null]", as an array of syscalls. All ints are stored in strings to avoid overflows and specific notations.
OCaml Format definition:
Values can be typechecked by the OCaml compiler using the following ADT: