I am writing a logger in C++ that generates an HTML5 output in real time. So the HTML file must be readable at any time, even while growing.
So far I open the file, I delete the last few lines that close the block (</body></html>
), I add the new log messages and I close the block again.
Is this a good approach, or are there any better solutions?