src/Joli/JoliCi/LoggerCallback.php
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(),
        ));
    }
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(),
        ));
    }
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 ( ) , ) ) ; }
The build callback when creating a image, useful to see what happens during building

@param BuildInfo $output An encoded json string from docker daemon
The build callback when creating a image useful to see what happens during building