Skip to content

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

Open
angusholder wants to merge 1 commit into
ardiehl:mainfrom
mobile-power:csv_fixes
Open

Flush the file after each auto log line, to prevent partial lines on disk#1
angusholder wants to merge 1 commit into
ardiehl:mainfrom
mobile-power:csv_fixes

Conversation

@angusholder

Copy link
Copy Markdown

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