I’ve got a very small standalone vb.net app that gets run automatically. Every now and then it hits an error condition that I want to log and then keep processing. But, this is far too minor a thing to store in the system’s main log – I really just want to append a line to a text file.
What’s the least stress way to append a line of text to a file (and have it create the file if it’s not there) under .net?
IO.File.AppendAllText(@’Y:\our\File\Name.here’, ‘your log message here’)