How can I dynamically log as the program runs?
My logging creates a StreamWriter and FileStream: //Activate Logging try { streamer = new FileStream("filepath and name", FileMode.OpenOrCreate, FileAccess.Write); writer = new StreamWriter(streamer); } I use parameters to create the file name. If an error occurs before this file is created I create another file called "crashlog", which logs the error itself. However, this file is sometimes empty. If an unhandled error occurs, even if the original logfile is created, that file is empty. I believe the log gets dumped in it's entirety once the program exits and the stream/writer are closed. Is t
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.