@@ -404,7 +404,9 @@ func runWatcher(watcher *inotify.Watcher, config *Config) {
404
404
if ev .Mask == inotify .IN_CREATE {
405
405
if _ , ok := (* config ).Settings [ev .Name ]; ok {
406
406
watcher .AddWatch (ev .Name , InotifyFlags )
407
- log .Printf ("File created: %s\n " , ev .Name )
407
+ if verbosevar {
408
+ log .Printf ("File created: %s\n " , ev .Name )
409
+ }
408
410
}
409
411
// Catch directory creation events for non-existent directories in executable path
410
412
} else if ev .Mask == (inotify .IN_CREATE | inotify .IN_ISDIR ) {
@@ -415,7 +417,9 @@ func runWatcher(watcher *inotify.Watcher, config *Config) {
415
417
}
416
418
} else if ev .Mask == inotify .IN_DELETE_SELF || ev .Mask == inotify .IN_MOVE_SELF {
417
419
if _ , ok := (* config ).Settings [ev .Name ]; ok {
418
- log .Printf ("File deleted: %s\n " , ev .Name )
420
+ if verbosevar {
421
+ log .Printf ("File deleted: %s\n " , ev .Name )
422
+ }
419
423
parent := filepath .Dir (ev .Name )
420
424
watcher .AddWatch (parent , InotifyDirFlags )
421
425
continue
@@ -424,13 +428,16 @@ func runWatcher(watcher *inotify.Watcher, config *Config) {
424
428
if _ , ok := (* config ).Settings [ev .Name ]; ok {
425
429
exists := pathExists (ev .Name )
426
430
if ! exists {
427
- log .Printf ("File deleted: %s\n " , ev .Name )
431
+ if verbosevar {
432
+ log .Printf ("File deleted: %s\n " , ev .Name )
433
+ }
428
434
parent := filepath .Dir (ev .Name )
429
435
watcher .AddWatch (parent , InotifyDirFlags )
430
436
continue
431
437
} else {
432
- log .Printf ("File attributes changed: %s\n " , ev .Name )
433
-
438
+ if verbosevar {
439
+ log .Printf ("File attributes changed: %s\n " , ev .Name )
440
+ }
434
441
}
435
442
}
436
443
}
0 commit comments