23 'level_name' =>
'WARNING',
30 $this->assertEquals(
'['.
date(
'Y-m-d').
'] log.WARNING: foo [] []'.
"\n",
$message);
37 'level_name' =>
'ERROR',
49 $this->assertEquals(
'['.
date(
'Y-m-d').
'] meh.ERROR: foo {"foo":"bar","baz":"qux","bool":false,"null":null} []'.
"\n",
$message);
56 'level_name' =>
'ERROR',
60 'extra' =>
array(
'ip' =>
'127.0.0.1'),
63 $this->assertEquals(
'['.
date(
'Y-m-d').
'] meh.ERROR: log [] {"ip":"127.0.0.1"}'.
"\n",
$message);
68 $formatter =
new LineFormatter(
"[%datetime%] %channel%.%level_name%: %message% %context% %extra.file% %extra%\n",
'Y-m-d');
70 'level_name' =>
'ERROR',
74 'extra' =>
array(
'ip' =>
'127.0.0.1',
'file' =>
'test'),
77 $this->assertEquals(
'['.
date(
'Y-m-d').
'] meh.ERROR: log [] test {"ip":"127.0.0.1"}'.
"\n",
$message);
84 'level_name' =>
'ERROR',
91 $this->assertEquals(
'['.
date(
'Y-m-d').
'] meh.ERROR: log '.
"\n",
$message);
96 $formatter =
new LineFormatter(
'%context.foo% => %extra.foo%');
98 'level_name' =>
'ERROR',
100 'context' =>
array(
'foo' =>
'bar'),
102 'extra' =>
array(
'foo' =>
'xbar'),
105 $this->assertEquals(
'bar => xbar',
$message);
112 'level_name' =>
'ERROR',
114 'context' =>
array(),
116 'extra' =>
array(
'foo' =>
new TestFoo,
'bar' =>
new TestBar,
'baz' =>
array(),
'res' => fopen(
'php://memory',
'rb')),
117 'message' =>
'foobar',
120 $this->assertEquals(
'['.
date(
'Y-m-d').
'] meh.ERROR: foobar [] {"foo":"[object] (Monolog\\\\Formatter\\\\TestFoo: {\\"foo\\":\\"foo\\"})","bar":"[object] (Monolog\\\\Formatter\\\\TestBar: bar)","baz":[],"res":"[resource] (stream)"}'.
"\n",
$message);
127 'level_name' =>
'CRITICAL',
132 'message' =>
'foobar',
135 $path = str_replace(
'\\/',
'/', json_encode(__FILE__));
137 $this->assertEquals(
'['.
date(
'Y-m-d').
'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr(
$path, 1, -1).
':'.(__LINE__ - 8).
')"} []'.
"\n",
$message);
143 $previous = new \LogicException(
'Wut?');
145 'level_name' =>
'CRITICAL',
150 'message' =>
'foobar',
153 $path = str_replace(
'\\/',
'/', json_encode(__FILE__));
155 $this->assertEquals(
'['.
date(
'Y-m-d').
'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr(
$path, 1, -1).
':'.(__LINE__ - 8).
', LogicException(code: 0): Wut? at '.substr(
$path, 1, -1).
':'.(__LINE__ - 12).
')"} []'.
"\n",
$message);
163 'level_name' =>
'CRITICAL',
166 'context' =>
array(),
171 'level_name' =>
'WARNING',
174 'context' =>
array(),
179 $this->assertEquals(
'['.
date(
'Y-m-d').
'] test.CRITICAL: bar [] []'.
"\n".
'['.
date(
'Y-m-d').
'] log.WARNING: foo [] []'.
"\n",
$message);
187 'message' =>
"foo\nbar",
188 'context' =>
array(),
193 $this->assertRegExp(
'/foo bar/',
$message);
201 'message' =>
"foo\nbar",
202 'context' =>
array(),
207 $this->assertRegExp(
'/foo\nbar/',
$message);
catch(Exception $e) $message
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.