dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add Atayal (tay) language"
[lhc/web/wiklou.git]
/
maintenance
/
eval.php
diff --git
a/maintenance/eval.php
b/maintenance/eval.php
index
d98e5cd
..
40d29ef
100644
(file)
--- a/
maintenance/eval.php
+++ b/
maintenance/eval.php
@@
-30,6
+30,10
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\Logger\ConsoleSpi;
+use MediaWiki\MediaWikiServices;
+
$optionsWithArgs = [ 'd' ];
require_once __DIR__ . "/commandLine.inc";
$optionsWithArgs = [ 'd' ];
require_once __DIR__ . "/commandLine.inc";
@@
-37,16
+41,13
@@
require_once __DIR__ . "/commandLine.inc";
if ( isset( $options['d'] ) ) {
$d = $options['d'];
if ( $d > 0 ) {
if ( isset( $options['d'] ) ) {
$d = $options['d'];
if ( $d > 0 ) {
- $wgDebugLogFile = '/dev/stdout';
+ LoggerFactory::registerProvider( new ConsoleSpi );
+ // Some services hold Logger instances in object properties
+ MediaWikiServices::resetGlobalInstance();
}
if ( $d > 1 ) {
}
if ( $d > 1 ) {
- $lb = wfGetLB();
- $serverCount = $lb->getServerCount();
- for ( $i = 0; $i < $serverCount; $i++ ) {
- $server = $lb->getServerInfo( $i );
- $server['flags'] |= DBO_DEBUG;
- $lb->setServerInfo( $i, $server );
- }
+ wfGetDB( DB_MASTER )->setFlag( DBO_DEBUG );
+ wfGetDB( DB_REPLICA )->setFlag( DBO_DEBUG );
}
}
}
}