Skip to content

Commit 94950fe

Browse files
committed
minor #14422 [Monolog] Adding information to the monolog autowire documentation that specifi… (Matts)
This PR was merged into the 4.4 branch. Discussion ---------- [Monolog] Adding information to the monolog autowire documentation that specifi… Fixes #14316 Commits ------- feea398 Adding information to the monolog autowire documentation that specifies that the channel must be defined
2 parents f3c629e + feea398 commit 94950fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

logging/channels_handlers.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ How to Autowire Logger Channels
182182

183183
Starting from `MonologBundle`_ 3.5 you can autowire different Monolog channels
184184
by type-hinting your service arguments with the following syntax:
185-
``Psr\Log\LoggerInterface $<channel>Logger``. For example, to inject the service
186-
related to the ``app`` logger channel use this:
185+
``Psr\Log\LoggerInterface $<channel>Logger``. The ``<channel>`` must have been
186+
predefined in your Monolog configuration.
187+
188+
An example to inject the service related to the ``app`` logger channel:
187189

188190
.. code-block:: diff
189191

0 commit comments

Comments
 (0)