public function endAllOutputBuffers($lvl = 0)
    {
        $ob_cnt = 0;
        while (ob_get_level() > $lvl)
        {
            ++$ob_cnt;
            $contents = ob_get_contents();
            ob_end_clean();
        
            if (self::$logger instanceof \Psr\Log\NullLogger)
                continue;

            $lines = explode("\n", $contents);
            foreach ($lines as $n => $line)
            {
                if (!empty($line))
                    self::$logger->debug("Script output: {0}/{1}: {2}", [$ob_cnt, $n + 1, $line]);
            }
        }
    }
public function endAllOutputBuffers($lvl = 0)
    {
        $ob_cnt = 0;
        while (ob_get_level() > $lvl)
        {
            ++$ob_cnt;
            $contents = ob_get_contents();
            ob_end_clean();
        
            if (self::$logger instanceof \Psr\Log\NullLogger)
                continue;

            $lines = explode("\n", $contents);
            foreach ($lines as $n => $line)
            {
                if (!empty($line))
                    self::$logger->debug("Script output: {0}/{1}: {2}", [$ob_cnt, $n + 1, $line]);
            }
        }
    }
public function endAllOutputBuffers ( $ lvl = 0 ) { $ ob_cnt = 0 ; while ( ob_get_level ( ) > $ lvl ) { ++ $ ob_cnt ; $ contents = ob_get_contents ( ) ; ob_end_clean ( ) ; if ( self :: $ logger instanceof \ Psr \ Log \ NullLogger ) continue ; $ lines = explode ( "\n" , $ contents ) ; foreach ( $ lines as $ n => $ line ) { if ( ! empty ( $ line ) ) self :: $ logger -> debug ( "Script output: {0}/{1}: {2}" , [ $ ob_cnt , $ n + 1 , $ line ] ) ; } } }
Close all active output buffers and log their contents
Close all active output buffers and log their contents