What's a good class for writing a Log File Class?
What I need is a buffer (about 10kb) which can be flushed any time.
Besides in my case I can never know whether the user will write 1 line of text in an hour, or 1000 lines of text in a second, so I need something that is capable of keeping the connection to the file when not writing, and allowing outside sources to use the file, again when not writing...
What's a good class for that?
I tried stream writer, but I am not sure if that's the optimal solution...
Overhead for opening and closing file?
Isn't there some overhead for opening and closing file every time application writes something?
I have a very hihg performance required console application that does a lot of logging. Is it going to slow it down if log file is opened aand losed frequently?
Thanks.