add log purge method