logspout
logspout copied to clipboard
Not sending failed log message after reconnect
@imriz did a great job of summarizing this exact issue (and his fix) in bullet point 4 of his comment on #215 (comment)
To summarize, I have logs being sent to Papertrail but there are often gaps of an hour or two between events so the Papertrail connection times out and a reconnect is required. This reconnect happens instantly but the first log message of the series is always missing from Papertrail because logspout doesn't resend it after the connection is reestablished. I see the following constantly in my logspout logs:
syslog: write tcp xxx.xxx.xxx.xxx:xxxxxx->xxx.xxx.xxx.xxx.xxxxx: write: broken pipe
syslog: reconnecting up to 10 times
syslog: reconnect successful
I believe @imriz's fix resolves this and should be easy to apply upstream but I'm not a Go developer so I'm hoping someone can take this on and get this major issue resolved. It's the only thing keeping me from being 100% satisfied with logspout. It's amazing otherwise :)
The same issue here while sending to Papertrail