Refactored out common log parser initialization logic