rsyslog 解决日志截断不读取问题

reopenOnTruncate [on/off] (requires v8.16.0+)
Default: off


这是一个实验性的东西告诉rsyslog 重新input file 当它被truncated(inode 没有改变 但是文件大小是小于当前偏移量在内存里)


input(type="imfile"
File="/var/log/nginx/scan.log"
Tag="uat-scan"
Severity="info"
PersistStateInterval="1"
reopenOnTruncate="on"
Facility="local5")

posted @ 2016-10-10 16:04  czcb  阅读(468)  评论(0编辑  收藏  举报