Move up devunt's name to Developers
[lhc/web/wiklou.git] / includes / debug / logger / Shims.php
1 <?php
2 /**
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.
7 *
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.
12 *
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
17 *
18 * @file
19 */
20
21 /**
22 * Backwards compatibility stub for usage from before the introduction of
23 * MediaWiki\Logger\LoggerFactory.
24 *
25 * @deprecated since 1.25 Use \MediaWiki\Logger\LoggerFactory
26 * @todo This class should be removed before the 1.25 final release.
27 */
28 class MWLogger {
29
30 /**
31 * Register a service provider to create new \Psr\Log\LoggerInterface
32 * instances.
33 *
34 * @param \MediaWiki\Logger\Spi $provider Provider to register
35 * @deprecated since 1.25 Use MediaWiki\Logger\LoggerFactory::registerProvider()
36 */
37 public static function registerProvider( \MediaWiki\Logger\Spi $provider ) {
38 \MediaWiki\Logger\LoggerFactory::registerProvider( $provider );
39 }
40
41
42 /**
43 * Get the registered service provider.
44 *
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.
49 *
50 * @return \MediaWiki\Logger\Spi
51 * @see registerProvider()
52 * @see ObjectFactory::getObjectFromSpec()
53 * @deprecated since 1.25 Use MediaWiki\Logger\LoggerFactory::getProvider()
54 */
55 public static function getProvider() {
56 return \MediaWiki\Logger\LoggerFactory::getProvider();
57 }
58
59
60 /**
61 * Get a named logger instance from the currently configured logger factory.
62 *
63 * @param string $channel Logger channel (name)
64 * @return \Psr\Log\LoggerInterface
65 * @deprecated since 1.25 Use MediaWiki\Logger\LoggerFactory::getInstance()
66 */
67 public static function getInstance( $channel ) {
68 return \MediaWiki\Logger\LoggerFactory::getInstance( $channel );
69 }
70
71 }
72
73 /**
74 * Backwards compatibility stub for usage from before the introduction of
75 * the MediaWiki\Logger namespace.
76 *
77 * @deprecated since 1.25 Use \MediaWiki\Logger\LoggerFactory
78 * @todo This class should be removed before the 1.25 final release.
79 */
80 class MWLoggerFactory extends \MediaWiki\Logger\LoggerFactory {
81 }
82
83 /**
84 * Backwards compatibility stub for usage from before the introduction of
85 * the MediaWiki\Logger namespace.
86 *
87 * @deprecated since 1.25 Use \MediaWiki\Logger\LegacyLogger
88 * @todo This class should be removed before the 1.25 final release.
89 */
90 class MWLoggerLegacyLogger extends \MediaWiki\Logger\LegacyLogger {
91 }
92
93 /**
94 * Backwards compatibility stub for usage from before the introduction of
95 * the MediaWiki\Logger namespace.
96 *
97 * @deprecated since 1.25 Use \MediaWiki\Logger\LegacySpi
98 * @todo This class should be removed before the 1.25 final release.
99 */
100 class MWLoggerLegacySpi extends \MediaWiki\Logger\LegacySpi {
101 }
102
103 /**
104 * Backwards compatibility stub for usage from before the introduction of
105 * the MediaWiki\Logger namespace.
106 *
107 * @deprecated since 1.25 Use \MediaWiki\Logger\NullSpi
108 * @todo This class should be removed before the 1.25 final release.
109 */
110 class MWLoggerNullSpi extends \MediaWiki\Logger\NullSpi {
111 }
112
113 /**
114 * Backwards compatibility stub for usage from before the introduction of
115 * the MediaWiki\Logger namespace.
116 *
117 * @deprecated since 1.25 Use \MediaWiki\Logger\Spi
118 * @todo This class should be removed before the 1.25 final release.
119 */
120 interface MWLoggerSpi extends \MediaWiki\Logger\Spi {
121 }