basho/lager — Issue #30: Suppress sequential duplicate messages
Author: Vagabond
Created: 2011-12-07 21:58:22+00:00
State: open

If you have some subsystem go haywire and spam the same message over and over, lager currently doesn't have any protections to suppress the duplicates. Syslog, for example, will print 'last message repeated N times'.

Unfortunately, it's problematic to detect duplicate messages like this in a gen_event. One idea would be to add a 'proxy process' that is solely responsible for detecting duplicate messages and counting the number of duplicates before a different message comes in. The process could be a simple loop that just kept track of the last message and a duplicate count and it'd sit between the process calling the log functions and the gen_event.