public static void ReadLog()
{
// creat event watcher
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path = logpath;
watcher.NotifyFilter = NotifyFilters.LastWrite;
NotifyFilters.FileName;
// Add event handlers.
watcher.Changed += new FileSystemEventHandler(OnChanged);
// Begin watching.
watcher.EnableRaisingEvents = true;
//infinite loop
while(true)
{
BFS.VoiceBotActions.Delay(1);
}
}