title: How to empty log file
body: <p>This might be simple, but I can't find it anywhere. How do I clear the contents of the log file using NLog? I have created the Logger object and can successfully write messages to it, but now I want to programmatically delete the contents of the file, or maybe all contents before a particular date/time. How do I do that?</p>
  
  <p>Note that I'm NOT doing any kind of archiving (log files with timestamped file names). There is only one log file and messages inside that file are timestamped, so I need programmatic access to the file content to remove entries/clear entire file. Therefore the SO posts which suggest using NLog config option to handle automatic archiving/deletion do not work in my case.</p>