code: protected function logTask(TaskInterface $task, $level, $message, array $context = array())
      {
          $class = get_class($task);
          $message = sprintf('Task: %s. ', $class) . $message;
  
          $this->log($level, $message, $context);
      }
docs: Logs with an arbitrary level.
  Specialized to pass a task instance.
  
  @param TaskInterface $task
  @param mixed         $level
  @param string        $message
  @param array         $context
  
  @return null