public static function logRequest(OutputInterface $output, int $responseCode, ServerRequestInterface $request): void
    {
        $wrapOpen  = '';
        $wrapClose = '';

        if ($responseCode >= 400) {
            $wrapOpen  = '<comment>';
            $wrapClose = '</comment>';
        }

        $output->writeln(
            sprintf(
                '%s[%s] "%s %s HTTP/%s" %s%s',
                $wrapOpen,
                date("d/M/Y H:i:s"),
                $request->getMethod(),
                $request->getUri()->getPath(),
                $request->getProtocolVersion(),
                $responseCode,
                $wrapClose
            )
        );
    }
public static function logRequest(OutputInterface $output, int $responseCode, ServerRequestInterface $request): void
    {
        $wrapOpen  = '';
        $wrapClose = '';

        if ($responseCode >= 400) {
            $wrapOpen  = '<comment>';
            $wrapClose = '</comment>';
        }

        $output->writeln(
            sprintf(
                '%s[%s] "%s %s HTTP/%s" %s%s',
                $wrapOpen,
                date("d/M/Y H:i:s"),
                $request->getMethod(),
                $request->getUri()->getPath(),
                $request->getProtocolVersion(),
                $responseCode,
                $wrapClose
            )
        );
    }
public static function logRequest ( OutputInterface $ output , int $ responseCode , ServerRequestInterface $ request ) : void { $ wrapOpen = '' ; $ wrapClose = '' ; if ( $ responseCode >= 400 ) { $ wrapOpen = '<comment>' ; $ wrapClose = '</comment>' ; } $ output -> writeln ( sprintf ( '%s[%s] "%s %s HTTP/%s" %s%s' , $ wrapOpen , date ( "d/M/Y H:i:s" ) , $ request -> getMethod ( ) , $ request -> getUri ( ) -> getPath ( ) , $ request -> getProtocolVersion ( ) , $ responseCode , $ wrapClose ) ) ; }
Log a request

@param OutputInterface           $output       Output
@param int                       $responseCode Response code
@param ServerRequestInterface    $request      Request
Log a request