Skip to content
Snippets Groups Projects
Commit 8e0cdb46 authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[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: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent 646cd9b1
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment