From feea39804413ee607973e2bed12f433929945744 Mon Sep 17 00:00:00 2001 From: Matthew Smeets Date: Thu, 15 Oct 2020 20:30:28 +0200 Subject: [PATCH] Adding information to the monolog autowire documentation that specifies that the channel must be defined --- logging/channels_handlers.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/logging/channels_handlers.rst b/logging/channels_handlers.rst index b206c1c5137..bac0be76012 100644 --- a/logging/channels_handlers.rst +++ b/logging/channels_handlers.rst @@ -182,8 +182,10 @@ How to Autowire Logger Channels Starting from `MonologBundle`_ 3.5 you can autowire different Monolog channels by type-hinting your service arguments with the following syntax: -``Psr\Log\LoggerInterface $Logger``. For example, to inject the service -related to the ``app`` logger channel use this: +``Psr\Log\LoggerInterface $Logger``. The ```` must have been +predefined in your Monolog configuration. + +An example to inject the service related to the ``app`` logger channel: .. code-block:: diff