Some logger refactoring