File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,16 @@ option of your handler to ``rotating_file``:
338338 Using a Logger inside a Service
339339-------------------------------
340340
341+ If your application uses :ref: `service autoconfiguration <services-autoconfigure >`,
342+ any service whose class implements ``Psr\Log\LoggerAwareInterface `` will
343+ receive a call to its method ``setLogger() `` with the default logger service
344+ passed as a service.
345+
346+ .. versionadded :: 4.2
347+
348+ The automatic call to ``setLogger() `` when implementing ``LoggerAwareInterface ``
349+ was introduced in Symfony 4.2.
350+
341351If you want to use in your own services a pre-configured logger which uses a
342352specific channel (``app `` by default), use the ``monolog.logger `` tag with the
343353``channel `` property as explained in the
You can’t perform that action at this time.
0 commit comments