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")