File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -178,17 +178,17 @@ How to Autowire Logger Channels
178
178
Starting from `MonologBundle `_ 3.5 you can autowire different Monolog channels
179
179
by type-hinting your service arguments with the following syntax:
180
180
``Psr\Log\LoggerInterface $<channel>Logger ``. The ``<channel> `` must have been
181
- :ref: `predefined in your Monolog configuration <monolog-channels-config >` and be in camelCase format .
181
+ :ref: `predefined in your Monolog configuration <monolog-channels-config >`.
182
182
183
- For example to inject the service related to the ``app `` logger channel,
183
+ For example to inject the service related to the ``foo_bar `` logger channel,
184
184
change your constructor like this:
185
185
186
186
.. code-block :: diff
187
187
188
188
- public function __construct(LoggerInterface $logger)
189
- + public function __construct(LoggerInterface $appLogger )
189
+ + public function __construct(LoggerInterface $fooBarLogger )
190
190
{
191
- $this->logger = $appLogger ;
191
+ $this->logger = $fooBarLogger ;
192
192
}
193
193
194
194
.. _`MonologBundle` : https://github.com/symfony/monolog-bundle
You can’t perform that action at this time.
0 commit comments