I have a FileSystemWatcher object setup to monitor changes to a log file written by a console app. The notifier filter is set to: watcher.NotifyFilter = NotifyFilters.Size | NotifyFilters.LastWrite | NotifyFilters.LastAccess; Env: OS: Win 2k8 server.
The console app code that dumps to the stdout that is redirected to the file out.log:
void MySet::Dump() { std::cout << this << endl; fflush(stdout); }
After I run the Dump ( in the immediate window of debugger), the file size remains the same. If I run a "type" command the update seems to happen. Any ideas
c:\temp> dir 5/21/2010 11:11 AM 4,159 out.log
After Dump: (No change )
c:\temp> dir 05/21/2010 11:11 AM 4,159 out.log
Run a "type" command ...
c:\temp>type out.log File now has the new size ... c:\temp> dir 05/21/2010 11:11 AM 4,410 out.log
Why is this behaviour ? Am I missing something here? Thanks in advance.