code: private function buildCallback(BuildInfo $output)
      {
          $message = "";
  
          if ($output->getError()) {
              $this->logger->error(sprintf("Error when creating job: %s\n", $output->getError()), array('static' => false, 'static-id' => null));
              return;
          }
  
          if ($output->getStream()) {
              $message = $output->getStream();
          }
  
          if ($output->getStatus()) {
              $message = $output->getStatus();
  
              if ($output->getProgress()) {
                  $message .= " " . $output->getProgress();
              }
          }
  
          // Force new line
          if (!$output->getId() && !preg_match('#\n#', $message)) {
              $message .= "\n";
          }
  
          $this->logger->debug($message, array(
              'static' => $output->getId() !== null,
              'static-id' => $output->getId(),
          ));
      }
docs: The build callback when creating a image, useful to see what happens during building
  
  @param BuildInfo $output An encoded json string from docker daemon