mmetc 2 年之前
父节点
当前提交
2088bb1f91
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pkg/acquisition/modules/file/file.go

+ 2 - 2
pkg/acquisition/modules/file/file.go

@@ -416,8 +416,8 @@ func (f *FileSource) tailFile(out chan types.Event, t *tomb.Tomb, tail *tail.Tai
 			return fmt.Errorf("reader for %s is dead", tail.Filename)
 			return fmt.Errorf("reader for %s is dead", tail.Filename)
 		case line := <-tail.Lines:
 		case line := <-tail.Lines:
 			if line == nil {
 			if line == nil {
-				logger.Debugf("Nil line")
-				return fmt.Errorf("tail for %s is empty", tail.Filename)
+				logger.Warningf("tail for %s is empty", tail.Filename)
+				continue
 			}
 			}
 			if line.Err != nil {
 			if line.Err != nil {
 				logger.Warningf("fetch error : %v", line.Err)
 				logger.Warningf("fetch error : %v", line.Err)