Sebastien Blot пре 4 година
родитељ
комит
3f3e8b4a2d
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      pkg/acquisition/modules/file/file.go

+ 3 - 0
pkg/acquisition/modules/file/file.go

@@ -60,6 +60,9 @@ func (f *FileSource) Configure(Config []byte, logger *log.Entry) error {
 		return fmt.Errorf("no filename or filenames configuration provided")
 	}
 	f.config = fileConfig
+	if f.config.Mode == "" {
+		f.config.Mode = configuration.TAIL_MODE
+	}
 	f.watcher, err = fsnotify.NewWatcher()
 	if err != nil {
 		return errors.Wrapf(err, "Could not create fsnotify watcher")