protected function write(array $record)
    {
        if ($record['level'] < Logger::ERROR) {
            return false;
        }

        if (isset($record['context']['exception'])
            && ($record['context']['exception'] instanceof NotFoundHttpException
                || $record['context']['exception'] instanceof AccessDeniedHttpException
                || $record['context']['exception'] instanceof ResourceNotFoundException)
        ) {
            return false;
        }

        $msg = '';
        if ($this->server->get('HTTP_HOST') && $this->server->get('REQUEST_URI')) {
            $scheme = $this->httpScheme ? $this->httpScheme : $this->server->get('REQUEST_SCHEME');
            if (is_null($scheme)) {
                $https = $this->server->get('HTTPS');
                $scheme = (empty($https) || 'off' === $https) ? 'http' : 'https';
            }
            $host = $this->httpHost ? $this->httpHost : $this->server->get('HTTP_HOST');
            if (false !== idn_to_utf8($host)) {
                $host = idn_to_utf8($host);
            }

            $msg = sprintf('Request url: %s://%s%s<br/>', $scheme, $host, $this->server->get('REQUEST_URI'));
        }

        if ($this->post->count() > 0 || $this->get->count() > 0) {
            $data = array_merge($this->post->all(), $this->get->all());
            $msg .= "Request data: " . json_encode($data) . "<br>";
        }

        if (isset($record['message'])) {
            $msg .= $record['message'];
            $this->hipchat->message_room($this->room, $this->name, $msg, true);

            return true;
        }

        return false;
    }
protected function write(array $record)
    {
        if ($record['level'] < Logger::ERROR) {
            return false;
        }

        if (isset($record['context']['exception'])
            && ($record['context']['exception'] instanceof NotFoundHttpException
                || $record['context']['exception'] instanceof AccessDeniedHttpException
                || $record['context']['exception'] instanceof ResourceNotFoundException)
        ) {
            return false;
        }

        $msg = '';
        if ($this->server->get('HTTP_HOST') && $this->server->get('REQUEST_URI')) {
            $scheme = $this->httpScheme ? $this->httpScheme : $this->server->get('REQUEST_SCHEME');
            if (is_null($scheme)) {
                $https = $this->server->get('HTTPS');
                $scheme = (empty($https) || 'off' === $https) ? 'http' : 'https';
            }
            $host = $this->httpHost ? $this->httpHost : $this->server->get('HTTP_HOST');
            if (false !== idn_to_utf8($host)) {
                $host = idn_to_utf8($host);
            }

            $msg = sprintf('Request url: %s://%s%s<br/>', $scheme, $host, $this->server->get('REQUEST_URI'));
        }

        if ($this->post->count() > 0 || $this->get->count() > 0) {
            $data = array_merge($this->post->all(), $this->get->all());
            $msg .= "Request data: " . json_encode($data) . "<br>";
        }

        if (isset($record['message'])) {
            $msg .= $record['message'];
            $this->hipchat->message_room($this->room, $this->name, $msg, true);

            return true;
        }

        return false;
    }
protected function write ( array $ record ) { if ( $ record [ 'level' ] < Logger :: ERROR ) { return false ; } if ( isset ( $ record [ 'context' ] [ 'exception' ] ) && ( $ record [ 'context' ] [ 'exception' ] instanceof NotFoundHttpException || $ record [ 'context' ] [ 'exception' ] instanceof AccessDeniedHttpException || $ record [ 'context' ] [ 'exception' ] instanceof ResourceNotFoundException ) ) { return false ; } $ msg = '' ; if ( $ this -> server -> get ( 'HTTP_HOST' ) && $ this -> server -> get ( 'REQUEST_URI' ) ) { $ scheme = $ this -> httpScheme ? $ this -> httpScheme : $ this -> server -> get ( 'REQUEST_SCHEME' ) ; if ( is_null ( $ scheme ) ) { $ https = $ this -> server -> get ( 'HTTPS' ) ; $ scheme = ( empty ( $ https ) || 'off' === $ https ) ? 'http' : 'https' ; } $ host = $ this -> httpHost ? $ this -> httpHost : $ this -> server -> get ( 'HTTP_HOST' ) ; if ( false !== idn_to_utf8 ( $ host ) ) { $ host = idn_to_utf8 ( $ host ) ; } $ msg = sprintf ( 'Request url: %s://%s%s<br/>' , $ scheme , $ host , $ this -> server -> get ( 'REQUEST_URI' ) ) ; } if ( $ this -> post -> count ( ) > 0 || $ this -> get -> count ( ) > 0 ) { $ data = array_merge ( $ this -> post -> all ( ) , $ this -> get -> all ( ) ) ; $ msg .= "Request data: " . json_encode ( $ data ) . "<br>" ; } if ( isset ( $ record [ 'message' ] ) ) { $ msg .= $ record [ 'message' ] ; $ this -> hipchat -> message_room ( $ this -> room , $ this -> name , $ msg , true ) ; return true ; } return false ; }
Send message to HipChat room

@param  array
@return bool
Send message to HipChat room