-
May 14th, 2004, 08:00 PM
#1
Thread Starter
Conquistador
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
-
May 15th, 2004, 04:06 PM
#2
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.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|