IMG-8: Factor out duplicate log message parts.