25 $_SERVER[
'HTTP_USER_AGENT'] =
'Monolog Test; Chrome/1.0';
33 $_SERVER[
'HTTP_USER_AGENT'] = $agent;
41 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array(
43 'columns' => array(
'label',
'log',
'backtrace',
'type'),
52 $this->assertEquals($expected,
$handler->getHeaders());
58 array(
'Monolog Test; Chrome/1.0'),
59 array(
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0'),
60 array(
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/56.0.2924.76 Chrome/56.0.2924.76 Safari/537.36'),
61 array(
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36'),
75 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array(
77 'columns' => array(
'label',
'log',
'backtrace',
'type'),
87 str_repeat(
'a', 150 * 1024),
93 'Incomplete logs, chrome header size limit reached',
102 $this->assertEquals($expected,
$handler->getHeaders());
118 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array(
120 'columns' => array(
'label',
'log',
'backtrace',
'type'),
131 $this->assertEquals($expected, $handler2->getHeaders());
137 protected $headers = array();
141 self::$initialized =
false;
142 self::$overflowed =
false;
143 self::$sendHeaders =
true;
144 self::$json[
'rows'] = array();
149 $this->headers[
$header] = $content;
154 return $this->headers;
const DEBUG
Detailed debug information.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
testHeaders($agent)
agentsProvider
sendHeader($header, $content)
getRecord($level=Logger::WARNING, $message='test', $context=array())
Handler sending logs to the ChromePHP extension (http://www.chromephp.com/)
const WARNING
Exceptional occurrences that are not errors.
const VERSION
Version of the extension.