File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -639,6 +639,10 @@ You can also use the ``bind`` keyword to bind specific arguments by name or type
639
639
# that's defined in this file (including controller arguments)
640
640
$adminEmail : ' manager@example.com'
641
641
642
+ # pass this service to any $requestLogger argument for any
643
+ # service that's defined in this file
644
+ $requestLogger : ' @monolog.logger.request'
645
+
642
646
# pass this service for any LoggerInterface type-hint for any
643
647
# service that's defined in this file
644
648
Psr\Log\LoggerInterface : ' @monolog.logger.request'
@@ -657,7 +661,11 @@ You can also use the ``bind`` keyword to bind specific arguments by name or type
657
661
<services >
658
662
<defaults autowire =" true" autoconfigure =" true" public =" false" >
659
663
<bind key =" $adminEmail" >manager@example.com</bind >
660
- <bind key =" $logger"
664
+ <bind key =" $requestLogger"
665
+ type =" service"
666
+ id =" monolog.logger.request"
667
+ />
668
+ <bind key =" Psr\Log\LoggerInterface"
661
669
type =" service"
662
670
id =" monolog.logger.request"
663
671
/>
@@ -678,6 +686,7 @@ You can also use the ``bind`` keyword to bind specific arguments by name or type
678
686
->setPublic(true)
679
687
->setBindings(array(
680
688
'$adminEmail' => 'manager@example.com',
689
+ '$requestLogger' => new Reference('monolog.logger.request'),
681
690
LoggerInterface::class => new Reference('monolog.logger.request'),
682
691
))
683
692
;
You can’t perform that action at this time.
0 commit comments