Pull out log processing into separate class