Open zhengxiaochuan-3 opened 5 years ago
tailer, err := tail.TailFile(podLogPath, tail.Config{ ReOpen: true, MustExist: true, Follow: true, Poll: true, Logger: tail.DiscardingLogger, RateLimiter: lp.limiter, Location: &tail.SeekInfo{0, 2}, })
When log file being writed very fast , and rotated , will lose logs . what I'm missed ?
I'm not sure about the internals of this library, but... I think this lightening talk by Bryan Cantrill is relevant.
Change POLL_DURATION from 250 * time.Millisecond to 2*time.Millisecond helpful.
250 * time.Millisecond
2*time.Millisecond
When log file being writed very fast , and rotated , will lose logs . what I'm missed ?