Skip to main content

rotate_if_needed

Function rotate_if_needed 

Source
pub fn rotate_if_needed() -> bool
Expand description

Check if log rotation is needed and perform it. Returns true if rotation was triggered (i.e., entries exceeded MAX_LOG_ENTRIES). In the in-memory case this resets the counter to simulate discarding old entries. Callers that maintain their own log buffers should drain old entries when this returns true.