logger refactor