logger factory refactoring