Closed iowelinux closed 8 years ago
Nothing is logged.
What should be logged? Could you go run -tags debug main.go
, do whatever file operations you're doing and then paste the output here?
What should be logged?
As you can see in the code path and event type should be printed using log.Println
Seems like it was some kind of mistake at my side because the same code works now. Sorry for that. I can detect Remove, Create, Rename events but can't get access events at all.
For instance running the following commands on Linux doesn't output anything:
cat test
nothing.
#!/usr/bin/perl
open FH, "test";
while (<FH>) {
print $_;
}
close FH;
nothing.
I believe InAccess and InOpen events should be detected in this case. Shouldn't it? All test were done on Linux 3.10.0 x86_64 kernel
https://godoc.org/github.com/rjeczalik/notify#pkg-constants
notify.All
is defined as:
const (
Create = osSpecificCreate
Remove = osSpecificRemove
Write = osSpecificWrite
Rename = osSpecificRename
// All is handful alias for all platform-independent event values.
All = Create | Remove | Write | Rename
)
If you want linux-specific events like notify.InAccess
, you need to pass it additionally.
Hi,
Actually this is not an issue however I believe your answer would be really helpful for lots of developers. Here is a simple code I try to run.
Nothing is logged. Do I do something wrong?