Refactored some logging config code.