MarkTraceur has uploaded a new change for review.
https://gerrit.wikimedia.org/r/179154
Change subject: Revert "Configure logging to use MWLoggerMonologSpi"
......................................................................
Revert "Configure logging to use MWLoggerMonologSpi"
This reverts commit 29f8c54f9dd63e421b081d5ad3a19742cd6c4805.
Change-Id: Ic9af8aab29b7412c1d264f7ee81c6a39546d7642
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
D wmf-config/logging.php
3 files changed, 1 insertion(+), 90 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/54/179154/1
diff --git a/wmf-config/CommonSettings-labs.php
b/wmf-config/CommonSettings-labs.php
index 478a819..9f4b9c8 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -7,6 +7,7 @@
# Should not be loaded on production
if( $wmfRealm == 'labs' ) { # safe guard
+ include( "logging-labs.php" );
// test wiki
if ( $wgDBname == 'testwiki' ) {
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9b8d245..5354af1 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -236,11 +236,6 @@
# Needs to be before db.php
require( "$wmfConfigDir/PrivateSettings.php" );
-# Monolog logging configuration
-wfProfileIn( "$fname-logging" );
-require( getRealmSpecificFilename( "$wmfConfigDir/logging.php" ) );
-wfProfileOut( "$fname-logging" );
-
# Cluster-dependent files for database and memcached
require( getRealmSpecificFilename( "$wmfConfigDir/db.php" ) );
$wgMemCachedServers = array();
@@ -3023,5 +3018,4 @@
require( "$wmfConfigDir/ExtensionMessages-$wmfVersionNumber.php" );
wfProfileOut( "$fname-misc5" );
-
wfProfileOut( $fname );
diff --git a/wmf-config/logging.php b/wmf-config/logging.php
deleted file mode 100644
index 22eaa03..0000000
--- a/wmf-config/logging.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-// Monolog logging configuration
-// Note: the legacy handlers still use $wgDebugLogGroups and other legacy
-// logging config variables to determine logging output.
-$wmgMonologConfig = array(
- 'loggers' => array(
- // Nothing is logged unless a specific channel config is added
- '@default' => array(
- 'handlers' => array( 'null' ),
- ),
- ),
-
- 'processors' => array(
- 'wiki' => array(
- 'class' => 'MWLoggerMonologProcessor',
- ),
- 'psr' => array(
- 'class' =>
'\\Monolog\\Processor\\PsrLogMessageProcessor',
- ),
- 'pid' => array(
- 'class' => '\\Monolog\\Processor\\ProcessIdProcessor',
- ),
- 'uid' => array(
- 'class' => '\\Monolog\\Processor\\UidProcessor',
- ),
- 'web' => array(
- 'class' => '\\Monolog\\Processor\\WebProcessor',
- ),
- ),
-
- 'handlers' => array(
- 'null' => array(
- 'class' => '\\Monolog\\Handler\\NullHandler',
- ),
- 'logstash' => array(
- 'class' => '\\Monolog\\Handler\\RedisHandler',
- 'args' => array(
- function() use ( $wmgLogstashPassword ) {
- $redis = new Redis();
- // Spread connections randomly across
all logstash
- // hosts.
- $server = array_rand( array(
- '10.64.32.138', //
logstash1001.eqiad.wmnet
- '10.64.32.137', //
logstash1002.eqiad.wmnet
- '10.64.32.136', //
logstash1003.eqiad.wmnet
- ) );
- $redis->connect( $server, 6379, .25 );
- $redis->auth( $wmgLogstashPassword );
- return $redis;
- },
- 'logstash'
- ),
- 'formatter' => 'logstash',
- ),
- ),
-
- 'formatters' => array(
- 'legacy' => array(
- 'class' => 'MWLoggerMonologLegacyFormatter',
- ),
- 'logstash' => array(
- 'class' => '\\Monolog\\Formatter\\LogstashFormatter',
- 'args' => array( 'mediawiki', php_uname( 'n' ), null,
'', 1 ),
- ),
- ),
-);
-
-// Add logging channels defined in $wgDebugLogGroups
-foreach ( $wgDebugLogGroups as $group => $dest ) {
- $wmgMonologConfig['loggers'][$group] = array(
- 'handlers' => array( $group, 'logstash' ),
- 'processors' => array( 'wiki', 'psr', 'pid', 'uid', 'web' ),
- );
- $wmgMonologConfig['handlers'][$group] = array(
- 'class' => 'MWLoggerMonologHandler',
- 'args' => array( $dest, true ),
- 'formatter' => 'legacy',
- );
-}
-
-$wgMWLoggerDefaultSpi = array(
- 'class' => 'MWLoggerMonologSpi',
- 'args' => array( $wmgMonologConfig ),
-);
--
To view, visit https://gerrit.wikimedia.org/r/179154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9af8aab29b7412c1d264f7ee81c6a39546d7642
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits