[FEATURE] Support PHP 8 style Channel attribute for logger injection
Services are now able to control the component name that an injected logger is created with. This allows to group logs of related classes and is basically a channel system as often used in monolog. Therefore and as preparation for future monolog logging, the attribute is named Channel. The Channel attribute is supported for constructor argument injection as a class and parameter specific attribute and for LoggerAwareInterface dependency injection services as a class attribute. This feature is only available with PHP 8. The channel attribute will be gracefully ignored in PHP 7, and the classic component name will be used instead. Releases: master Resolves: #95079 Related: #95044 Change-Id: I4b710677bc20c4200fc14b299865f4c7f95e4d0d Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70849 Tested-by:Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Benjamin Franzke <bfr@qbus.de> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- typo3/sysext/core/Classes/DependencyInjection/LoggerAwarePass.php 27 additions, 1 deletion...sext/core/Classes/DependencyInjection/LoggerAwarePass.php
- typo3/sysext/core/Classes/DependencyInjection/LoggerInterfacePass.php 34 additions, 1 deletion.../core/Classes/DependencyInjection/LoggerInterfacePass.php
- typo3/sysext/core/Classes/Log/Channel.php 34 additions, 0 deletionstypo3/sysext/core/Classes/Log/Channel.php
- typo3/sysext/core/Documentation/Changelog/master/Feature-95079-SupportPHP8StyleChannelAttributeForLoggerInjection.rst 83 additions, 0 deletions...79-SupportPHP8StyleChannelAttributeForLoggerInjection.rst
Please register or sign in to comment