Log purges

@linojon 
please take a look at my implementation of logging the purges.
(I didn't write the tests for testing the purging yet).