logger refactoring