Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File notifications from Java on Windows #74

Open
brolund opened this issue Aug 26, 2014 · 0 comments
Open

File notifications from Java on Windows #74

brolund opened this issue Aug 26, 2014 · 0 comments

Comments

@brolund
Copy link

brolund commented Aug 26, 2014

I have a weird problem (with a workaround hack, see below) at my client. Changes that the logging system on JBoss make to my log files are not caught by the fs.watch(dir) function, hence I get no input in node-logstash. I get the feeling this could be Java file writing that bypasses the Windows stuff that sends events via ReadDirectoryChangesW, but I have no backing for this (Google wasn't my friend today...).

So, I hacked a bit in directory_watcher.js and added an fs.watchFile(...) on each of the files in dir, and every 5 sec (configurable polling interval on watchFile) I get an event. Interestingly, this triggers the fs.watch(...) functionality, so I don't need to do anything in the fs.watchFile(...) handler function.

Has anyone seen anything like this? Any better workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant