Refactor log messages.