Closed lars18th closed 1 year ago
Sounds like a good idea. We should modify or buffer the lines so that they're easier to parse.
In principle, if we did that, thinking a bit further, we could also just directly write the CSV and LD-JSON output from the binary. It's only my lack of willingness to do that in C++ that has prevented this so far.
Sounds like a good idea. We should modify or buffer the lines so that they're easier to parse.
In principle, if we did that, thinking a bit further, we could also just directly write the CSV and LD-JSON output from the binary. It's only my lack of willingness to do that in C++ that has prevented this so far.
Well, I prefer to leave the option to save the logfile. However, regarding the idea of removing the python code it can be useful. But as you mentioned this will implies a lot of work using C/C++ libraries (for parsing, CSV and JSON support). So, I suggest to first implement this option.
Regards.
Hi,
I suggest this idea: Include support for
[-l | -k | -n]
where-n
represents:-n, --no-logfile "not use a logfile, compute directly"
.After incorporating my PR #26 (re-adapted to the current code), it will be possible to use the function
log_callback()
to adapt the output. Then in a direct mode instead of writing to a file, the datalog lines can be passed over the STDIN/STDOUT to the python parser directly. In this case, a chunk of lines are preferable to overcome troubles. In fact, the idea is to buffer a complete frame and flush when it ends (at the line with thepkt_size
lable).What you think?