src/A1comms/GaeSupportLaravel/Integration/ErrorReporting/Report.php
/**
     * @param int $level The error level.
     * @param string $message The error message.
     * @param string $file The filename that the error was raised in.
     * @param int $line The line number that the error was raised at.
     */
@param int $level The error level.
@param string $message The error message.
@param string $file The filename that the error was raised in.
@param int $line The line number that the error was raised at.
@param int $level The error level . @param string $message The error message . @param string $file The filename that the error was raised in . @param int $line The line number that the error was raised at .
public static function errorHandler($level, $message, $file, $line)
    {
        if (!($level & error_reporting())) {
            return true;
        }
        $message =  sprintf(
            '%s: %s in %s on line %d',
            self::getErrorPrefix($level),
            $message,
            $file,
            $line
        );
        if (!self::$psrLogger) {
            return false;
        }
        $service = gae_service();
        $version = gae_version();
        $context = [
            'context' => [
                'reportLocation' => [
                    'filePath' => $file,
                    'lineNumber' => $line,
                    'functionName' =>
                        self::getFunctionNameForReport(),
                ],
                'httpRequest' => [
                    'method'                => empty($_SERVER['REQUEST_METHOD']) ?: $_SERVER['REQUEST_METHOD'],
                    'url'                   => (empty($_SERVER['HTTP_HOST']) ? '' :  $_SERVER['HTTP_HOST']). (empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI']),
                    'userAgent'             => empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT'],
                    'referrer'              => empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'],
                    "responseStatusCode"    => null,
                    "remoteIp"              => empty($_SERVER['REMOTE_ADDR']) ? '' : $_SERVER['REMOTE_ADDR'],
                ],
                'user' => self::getUserNameForReport(),
            ],
            'serviceContext' => [
                'service' => $service,
                'version' => $version
            ]
        ];
        self::$psrLogger->log(
            self::getErrorLevelString($level),
            $message,
            $context
        );
    }
public static function errorHandler ( $ level , $ message , $ file , $ line ) { if ( ! ( $ level & error_reporting ( ) ) ) { return true ; } $ message = sprintf ( '%s: %s in %s on line %d' , self :: getErrorPrefix ( $ level ) , $ message , $ file , $ line ) ; if ( ! self :: $ psrLogger ) { return false ; } $ service = gae_service ( ) ; $ version = gae_version ( ) ; $ context = [ 'context' => [ 'reportLocation' => [ 'filePath' => $ file , 'lineNumber' => $ line , 'functionName' => self :: getFunctionNameForReport ( ) , ] , 'httpRequest' => [ 'method' => empty ( $ _SERVER [ 'REQUEST_METHOD' ] ) ? : $ _SERVER [ 'REQUEST_METHOD' ] , 'url' => ( empty ( $ _SERVER [ 'HTTP_HOST' ] ) ? '' : $ _SERVER [ 'HTTP_HOST' ] ) . ( empty ( $ _SERVER [ 'REQUEST_URI' ] ) ? '' : $ _SERVER [ 'REQUEST_URI' ] ) , 'userAgent' => empty ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) ? '' : $ _SERVER [ 'HTTP_USER_AGENT' ] , 'referrer' => empty ( $ _SERVER [ 'HTTP_REFERER' ] ) ? '' : $ _SERVER [ 'HTTP_REFERER' ] , " responseStatusCode " => null , " remoteIp " => empty ( $ _SERVER [ 'REMOTE_ADDR' ] ) ? '' : $ _SERVER [ 'REMOTE_ADDR' ] , ] , 'user' => self :: getUserNameForReport ( ) , ] , 'serviceContext' => [ 'service' => $ service , 'version' => $ version ] ] ; self :: $ psrLogger -> log ( self :: getErrorLevelString ( $ level ) , $ message , $ context ) ; }
@param int $level The error level.
@param int $level The error level .