Closed jbuehl closed 6 years ago
Note: this is completely untested.
thats what CI is for :) (tests are failing)
@oliv3r does provide the functionality you are looking for?
I updated all test samples. They each appear to differ by exactly 4 bytes. Is this expected?
specifically, the new .rec files are all 4 bytes shorter
That probably means it is working if the extraneous zero length messages are not there any more. A zero length message would consist of the 4 byte magic number and nothing else.
Yeah, the 4 bytes are to be expected, as that's what I ran into and what I also pushed in my simplistic version. I think your version is better as it goes down deeper into where its storing bytes. While there still exists a chance of bytes not being logged/going missing, the chances are far slimmer then they where before.
I think we can loose messages if something happens while reading the single bytes to compose the full message that is 'eventually' stored in inBuf.
Currently i'm running this branch on my system so hopefully i don't loose any messages :) The logger output is much more silent now in its output or at least more pleasant to read.
This is intended to address issue #90. Bytes are written to the record file as they are read from the input file before there is any attempt to parse messages which should result in an exact copy of the input data. Sent messages are written to the record file as before. Logging of messages written to the record file is removed.