Only log this if we have a logger.