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
22 * Backwards compatibility stub for usage from before the introduction of
23 * MediaWiki\Logger\LoggerFactory.
25 * @deprecated since 1.25 Use \MediaWiki\Logger\LoggerFactory
26 * @todo This class should be removed before the 1.25 final release.
31 * Register a service provider to create new \Psr\Log\LoggerInterface
34 * @param \MediaWiki\Logger\Spi $provider Provider to register
35 * @deprecated since 1.25 Use MediaWiki\Logger\LoggerFactory::registerProvider()
37 public static function registerProvider( \MediaWiki\Logger\Spi
$provider ) {
38 \MediaWiki\Logger\LoggerFactory
::registerProvider( $provider );
43 * Get the registered service provider.
45 * If called before any service provider has been registered, it will
46 * attempt to use the $wgMWLoggerDefaultSpi global to bootstrap
47 * MWLoggerSpi registration. $wgMWLoggerDefaultSpi is expected to be an
48 * array usable by ObjectFactory::getObjectFromSpec() to create a class.
50 * @return \MediaWiki\Logger\Spi
51 * @see registerProvider()
52 * @see ObjectFactory::getObjectFromSpec()
53 * @deprecated since 1.25 Use MediaWiki\Logger\LoggerFactory::getProvider()
55 public static function getProvider() {
56 return \MediaWiki\Logger\LoggerFactory
::getProvider();
61 * Get a named logger instance from the currently configured logger factory.
63 * @param string $channel Logger channel (name)
64 * @return \Psr\Log\LoggerInterface
65 * @deprecated since 1.25 Use MediaWiki\Logger\LoggerFactory::getInstance()
67 public static function getInstance( $channel ) {
68 return \MediaWiki\Logger\LoggerFactory
::getInstance( $channel );
74 * Backwards compatibility stub for usage from before the introduction of
75 * the MediaWiki\Logger namespace.
77 * @deprecated since 1.25 Use \MediaWiki\Logger\LoggerFactory
78 * @todo This class should be removed before the 1.25 final release.
80 class MWLoggerFactory
extends \MediaWiki\Logger\LoggerFactory
{
84 * Backwards compatibility stub for usage from before the introduction of
85 * the MediaWiki\Logger namespace.
87 * @deprecated since 1.25 Use \MediaWiki\Logger\LegacyLogger
88 * @todo This class should be removed before the 1.25 final release.
90 class MWLoggerLegacyLogger
extends \MediaWiki\Logger\LegacyLogger
{
94 * Backwards compatibility stub for usage from before the introduction of
95 * the MediaWiki\Logger namespace.
97 * @deprecated since 1.25 Use \MediaWiki\Logger\LegacySpi
98 * @todo This class should be removed before the 1.25 final release.
100 class MWLoggerLegacySpi
extends \MediaWiki\Logger\LegacySpi
{
104 * Backwards compatibility stub for usage from before the introduction of
105 * the MediaWiki\Logger namespace.
107 * @deprecated since 1.25 Use \MediaWiki\Logger\NullSpi
108 * @todo This class should be removed before the 1.25 final release.
110 class MWLoggerNullSpi
extends \MediaWiki\Logger\NullSpi
{
114 * Backwards compatibility stub for usage from before the introduction of
115 * the MediaWiki\Logger namespace.
117 * @deprecated since 1.25 Use \MediaWiki\Logger\Spi
118 * @todo This class should be removed before the 1.25 final release.
120 interface MWLoggerSpi
extends \MediaWiki\Logger\Spi
{