Skip to content

Flush the file after each auto log line, to prevent partial lines on disk #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

angusholder
Copy link

Thanks for your work on this, it works great. Big improvement over the program ZKETech supplies!

We have a scraper script that reads the CSVs periodically while the EBC is running, and I noticed that often the file ends with an incomplete line. I believe that WriteLn is buffering by number of bytes rather than by line, so sometimes it ends up flushing half way through writing a line. I fixed it by flushing after each SaveCSVLine in auto log mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant