I added an observer as follows:
watcher = new FileSystemWatcher(LOGFILES, "*.log");
watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
| NotifyFilters.FileName;
watcher.Changed += new FileSystemEventHandler(OnChanged);
watcher.Created += new FileSystemEventHandler(OnChanged);
watcher.Deleted += new FileSystemEventHandler(OnChanged);
watcher.Renamed += new RenamedEventHandler(OnRenamed);
watcher.EnableRaisingEvents = true;
and there is some external application entry for log files in the LOGFILES folder. But the observer does not seem to start on its own for hours, and then when I delete the desktop to the computer and manually open the folder, I can see for myself how the 1sec file later updates the size / timestamp.
Is it likely that the external application that writes the log files is first reset when the user really enters the folder or what can it do?
source
share