fetch the log content length from the db, instead of the content, then calculate the length

some refactorings to the purge service to work with these changes