every
Modifies the current log statement to be emitted at most one-in-N times. The specified count must be greater than zero and it is expected, but not required, that it is constant. In the absence of any other rate limiting, this method always allows the first invocation of any log statement to be emitted.
Notes
If multiple rate limiters are used for a single log statement, that log statement will only be emitted once all rate limiters have reached their threshold, and when a log statement is emitted all the rate limiters are reset. In particular forevery(N) this means that logs need not always be emitted at multiples of N if other rate limiters are active, though it will always be at least N. When rate limiting is active, a "skipped" count is added to log statements to indicate how many logs were disallowed since the last log statement was emitted.
If this method is called multiple times for a single log statement, the last invocation will take precedence.
Parameters
n
the factor by which to reduce logging frequency.
Throws
if n is not positive.