Fix duplicate logs & backlogs on container restart#201
Conversation
|
+1 for getting this merged. We start containers using cron every couple of minutes, so we get all the log history sent again on every single start. |
|
We're instead looking at #209 as a more elegant solution to the problem. Thanks for the +1 though. |
|
Any news on this? It's really an issue for us, as we start containers every couple of minutes, and monitor the logs via Papertrail alerts. Once a string that would trigger an alert gets logged from the container, it will be logged again and again on each container start, resulting in the alert being triggered again and again... Any idea how we can prevent that? Thx! |
|
@josegonzalez are we still looking at #209? Shall I rebase this PR, or abandon it? |
|
@josegonzalez (cc @olivergrahl) this is rebased, tested in my Staging and Prod and looking good. Takes care of the backlog dump with |
See PR gliderlabs#201. Set BACKLOG=false to disable default behaviour of sending backlogs.
|
merged in #280 |
Connects to #187
pumpLogswas being called on bothrestartandstart, which caused duplicate entries after a restart.BACKLOGSenvironment variable:BACKLOGS=false, it will default totruefor all other values, consistent with current behaviour;BACKLOGS=falseis equal todocker logs --tail=0