Trim log messages.