@@ -84,8 +84,10 @@ allows you to log the messages in several ways easily.
84
84
<container xmlns =" http://symfony.com/schema/dic/services"
85
85
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
86
86
xmlns : monolog =" http://symfony.com/schema/dic/monolog"
87
- xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
88
- http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
87
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
88
+ http://symfony.com/schema/dic/services/services-1.0.xsd
89
+ http://symfony.com/schema/dic/monolog
90
+ http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
89
91
90
92
<monolog : config >
91
93
<monolog : handler
@@ -140,7 +142,7 @@ allows you to log the messages in several ways easily.
140
142
));
141
143
142
144
The above configuration defines a stack of handlers which will be called
143
- in the order where they are defined.
145
+ in the order they are defined.
144
146
145
147
.. tip ::
146
148
@@ -185,8 +187,10 @@ easily. Your formatter must implement
185
187
<container xmlns =" http://symfony.com/schema/dic/services"
186
188
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
187
189
xmlns : monolog =" http://symfony.com/schema/dic/monolog"
188
- xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
189
- http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
190
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
191
+ http://symfony.com/schema/dic/services/services-1.0.xsd
192
+ http://symfony.com/schema/dic/monolog
193
+ http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
190
194
191
195
<services >
192
196
<service id =" my_formatter" class =" Monolog\Formatter\JsonFormatter" />
@@ -301,15 +305,21 @@ using a processor.
301
305
<container xmlns =" http://symfony.com/schema/dic/services"
302
306
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
303
307
xmlns : monolog =" http://symfony.com/schema/dic/monolog"
304
- xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
305
- http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
308
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
309
+ http://symfony.com/schema/dic/services/services-1.0.xsd
310
+ http://symfony.com/schema/dic/monolog
311
+ http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
306
312
307
313
<services >
308
- <service id =" monolog.formatter.session_request" class =" Monolog\Formatter\LineFormatter" >
314
+ <service id =" monolog.formatter.session_request"
315
+ class =" Monolog\Formatter\LineFormatter" >
316
+
309
317
<argument >[%%datetime%%] [%%extra.token%%] %%channel%%.%%level_name%%: %%message%%
 </argument >
310
318
</service >
311
319
312
- <service id =" monolog.processor.session_request" class =" Acme\MyBundle\SessionRequestProcessor" >
320
+ <service id =" monolog.processor.session_request"
321
+ class =" Acme\MyBundle\SessionRequestProcessor" >
322
+
313
323
<argument type =" service" id =" session" />
314
324
<tag name =" monolog.processor" method =" processRecord" />
315
325
</service >
@@ -330,11 +340,17 @@ using a processor.
330
340
331
341
// app/config/config.php
332
342
$container
333
- ->register('monolog.formatter.session_request', 'Monolog\Formatter\LineFormatter')
343
+ ->register(
344
+ 'monolog.formatter.session_request',
345
+ 'Monolog\Formatter\LineFormatter'
346
+ )
334
347
->addArgument('[%%datetime%%] [%%extra.token%%] %%channel%%.%%level_name%%: %%message%%\n');
335
348
336
349
$container
337
- ->register('monolog.processor.session_request', 'Acme\MyBundle\SessionRequestProcessor')
350
+ ->register(
351
+ 'monolog.processor.session_request',
352
+ 'Acme\MyBundle\SessionRequestProcessor'
353
+ )
338
354
->addArgument(new Reference('session'))
339
355
->addTag('monolog.processor', array('method' => 'processRecord'));
340
356
@@ -383,10 +399,12 @@ the ``monolog.processor`` tag:
383
399
xsi : schemaLocation =" http://symfony.com/schema/dic/services
384
400
http://symfony.com/schema/dic/services/services-1.0.xsd
385
401
http://symfony.com/schema/dic/monolog
386
- http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"
387
- >
402
+ http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
403
+
388
404
<services >
389
- <service id =" monolog.processor.session_request" class =" Acme\MyBundle\SessionRequestProcessor" >
405
+ <service id =" monolog.processor.session_request"
406
+ class =" Acme\MyBundle\SessionRequestProcessor" >
407
+
390
408
<argument type =" service" id =" session" />
391
409
<tag name =" monolog.processor" method =" processRecord" handler =" main" />
392
410
</service >
@@ -397,7 +415,10 @@ the ``monolog.processor`` tag:
397
415
398
416
// app/config/config.php
399
417
$container
400
- ->register('monolog.processor.session_request', 'Acme\MyBundle\SessionRequestProcessor')
418
+ ->register(
419
+ 'monolog.processor.session_request',
420
+ 'Acme\MyBundle\SessionRequestProcessor'
421
+ )
401
422
->addArgument(new Reference('session'))
402
423
->addTag('monolog.processor', array('method' => 'processRecord', 'handler' => 'main'));
403
424
@@ -429,10 +450,12 @@ the ``monolog.processor`` tag:
429
450
xsi : schemaLocation =" http://symfony.com/schema/dic/services
430
451
http://symfony.com/schema/dic/services/services-1.0.xsd
431
452
http://symfony.com/schema/dic/monolog
432
- http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"
433
- >
453
+ http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
454
+
434
455
<services >
435
- <service id =" monolog.processor.session_request" class =" Acme\MyBundle\SessionRequestProcessor" >
456
+ <service id =" monolog.processor.session_request"
457
+ class =" Acme\MyBundle\SessionRequestProcessor" >
458
+
436
459
<argument type =" service" id =" session" />
437
460
<tag name =" monolog.processor" method =" processRecord" channel =" main" />
438
461
</service >
@@ -443,7 +466,10 @@ the ``monolog.processor`` tag:
443
466
444
467
// app/config/config.php
445
468
$container
446
- ->register('monolog.processor.session_request', 'Acme\MyBundle\SessionRequestProcessor')
469
+ ->register(
470
+ 'monolog.processor.session_request',
471
+ 'Acme\MyBundle\SessionRequestProcessor'
472
+ )
447
473
->addArgument(new Reference('session'))
448
474
->addTag('monolog.processor', array('method' => 'processRecord', 'channel' => 'main'));
449
475
0 commit comments