Refactored Logger.