Skip to content

同时收集多个文件时,某个日志量少的文件的收集会延迟 #870

Answered by messixukejia
wkai886 asked this question in Help
Discussion options

You must be logged in to vote

可以检查下最后一行是否换行。

方法:替换下面的a.log为需要检查的文件
test "$(tail -c 1 a.log | wc -l)" -eq 0 && echo "no newline at eof: a.log"

可以帮忙改下文档:https://github.com/alibaba/ilogtail/blob/main/docs/cn/data-pipeline/input/file-log.md,可以加一个常见问题的章节。

方便的话,请把使用场景登记下,多谢。#693

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by messixukejia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants