3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
23 * Backwards compatibility stub for usage from before the introduction of
26 * @deprecated since 1.25 Use MWLoggerFactory
27 * @todo This class should be removed before the 1.25 final release.
32 * Register a service provider to create new \Psr\Log\LoggerInterface
35 * @param MWLoggerSpi $provider Provider to register
36 * @deprecated since 1.25 Use MWLoggerFactory::registerProvider()
38 public static function registerProvider( MWLoggerSpi
$provider ) {
39 MWLoggerFactory
::registerProvider( $provider );
44 * Get the registered service provider.
46 * If called before any service provider has been registered, it will
47 * attempt to use the $wgMWLoggerDefaultSpi global to bootstrap
48 * MWLoggerSpi registration. $wgMWLoggerDefaultSpi is expected to be an
49 * array usable by ObjectFactory::getObjectFromSpec() to create a class.
52 * @see registerProvider()
53 * @see ObjectFactory::getObjectFromSpec()
54 * @deprecated since 1.25 Use MWLoggerFactory::getProvider()
56 public static function getProvider() {
57 return MWLoggerFactory
::getProvider();
62 * Get a named logger instance from the currently configured logger factory.
64 * @param string $channel Logger channel (name)
65 * @return \Psr\Log\LoggerInterface
66 * @deprecated since 1.25 Use MWLoggerFactory::getInstance()
68 public static function getInstance( $channel ) {
69 return MWLoggerFactory
::getInstance( $channel );