I have write some logs in to locally. when logs count reached 200 then only I convert the logs into JSON to upload to server. Its worked perfectly.
My thought is I am also have one flush button the flush button control the remaining data or logs that means if the logs count is 240. The first 200 logs are automatically upload to server then remaining 40 logs are manually upload to server it means when user click the flus button it will be converted to JSON upload to server.
If user when view did load click the flush button 200 logs are uploaded and then overwriting 200 logs + 40 logs to be uploaded. How can I handle this issue.