Class names like MWLoggerMonologSyslogHandler are a bit gross. Since most of this is hidden under the covers by the configuration system there should be very little impact to renaming the existing classes. We can leave proxy shim classes in 1.25 for those that are likely to be exposed to extensions if needed but it should be pretty easy to track down all the usage that has happened so far.
|mediawiki/core||master||+403 -236||Move MWLogger classes to MediaWiki\Logger namespace|
|Resolved||bd808||T91653 Create a minimal backport of PSR-3 logging to MediaWiki 1.23 LTS|
|Resolved||bd808||T93406 Move MWLogger* classes to PHP namespaces rather than using faux namespaces in the class names|
I'm thinking the namespaces should be:
Should the code itself move from the current location to somewhere that would be compatible with a PSR-4 autoloader like $IP/includes/Core/...?
The base namespace that was used in the merged patch is MediaWiki\Logger. There is also a MediaWiki\Logger\Monolog namespace for Monolog specific classes.
The MediaWiki\Logger\LoggerFactory::getInstance( $channel ) static method is what most application level code should be interacting with to get a PSR-3 logger instance. This replaces the previous MWLoggerFactory::getInstance() and the deprecated MWLogger::getInstance() methods. Both of these are still available as shim classes until we get rid of all references to the old classes in extensions and WMF configuration files.