logdna / logdna-agent

LogDNA Agent streams from log files to your LogDNA account. Works with Linux, Windows, and macOS Servers
https://logdna.com
MIT License
138 stars 55 forks source link

Retry reading when file is locked #171

Closed summatix closed 4 years ago

summatix commented 4 years ago

https://github.com/logdna/logdna-agent/issues/167

This fixes a bug in the Windows version when applications have the file open and obtain a lock. The solution is simply to wait until the process has released the lock and read again.

I've tested this and the logs are showing up currently in LogDNA.

darinspivey commented 4 years ago

@summatix it's also worth noting that the underlying TailReadStream will be replaced soon by some new code that we authored. When its initial version is merged into the main branch, we will certainly add this support to it (and share it with you and the world, of course!) A constructor option that takes a "retry" list of codes and/or messages would keep it easy to use and generic. Standby!

smusali commented 4 years ago

Done in here