10000 Specified camelCase format limitation for logger channel autowiring · pableu/symfony-docs@09331e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09331e4

Browse files
VladZernovjaviereguiluz
authored andcommitted
Specified camelCase format limitation for logger channel autowiring
1 parent c926a14 commit 09331e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

logging/channels_handlers.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ by type-hinting your service arguments with the following syntax:
185185
``Psr\Log\LoggerInterface $<channel>Logger``. The ``<channel>`` must have been
186186
:ref:`predefined in your Monolog configuration <monolog-channels-config>`.
187187

188-
For example to inject the service related to the ``app`` logger channel,
188+
For example to inject the service related to the ``foo_bar`` logger channel,
189189
change your constructor like this:
190190

191191
.. code-block:: diff
192192
193193
- public function __construct(LoggerInterface $logger)
194-
+ public function __construct(LoggerInterface $appLogger)
194+
+ public function __construct(LoggerInterface $fooBarLogger)
195195
{
196-
$this->logger = $appLogger;
196+
$this->logger = $fooBarLogger;
197197
}
198198
199199
.. _`MonologBundle`: https://github.com/symfony/monolog-bundle

0 commit comments

Comments
 (0)
0