-
Realtime logging
I was wondering what the best way to log to a html file would be.
I.e. close off the html and body tag, but be able to reopen later
Any ideas
(I'd like to be able to still do it even after the program closes, and there may be a lot of logging to do, say for a mirc type app)
THanks :D
-
Well, if you never edit the log by hand then it's quite easy to ensure that the last line of the file is always
</body></html>
which is 14 characters. So, you open the file for appending, seek to 14 bytes before the end and just write, it will overwrite the end tags.
Though I really recommend you log to XML and then use XSLT to transform to (X)HTML for display.