Logger code refactored...