Refactor ProcessLogPart to talk to DB class