Logger refactor