Refactor logger start function.