[SPARK-3562]Periodic cleanup event logs

link #2391 
This looks a lot like `logCheckingThread`. Maybe it makes sense to make an abstract parent thread that both of these extend.