jenkins-bot has submitted this change and it was merged.
Change subject: Quit demoting log messages to debug under drupal
......................................................................
Quit demoting log messages to debug under drupal
This will bloat the recurring GlobalCollect logs, but it'll let us
know where things blow up.
Bug: T105848
Change-Id: Ie4ebb9cf36ec770d7cd487b05f2b4a9655fb7a99
---
M gateway_common/WmfFramework.drupal.php
M gateway_common/WmfFramework.mediawiki.php
M gateway_common/WmfFrameworkLogHandler.php
3 files changed, 6 insertions(+), 4 deletions(-)
Approvals:
Cdentinger: Looks good to me, approved
jenkins-bot: Verified
diff --git a/gateway_common/WmfFramework.drupal.php
b/gateway_common/WmfFramework.drupal.php
index 79508cb..2e2c8e5 100644
--- a/gateway_common/WmfFramework.drupal.php
+++ b/gateway_common/WmfFramework.drupal.php
@@ -9,8 +9,9 @@
* charges through GlobalCollect.
*/
class WmfFramework_Drupal {
- static function debugLog( $identifier, $msg ) {
- watchdog( 'DonationInterface', "{$identifier}: {$msg}", NULL,
WATCHDOG_DEBUG );
+ static function debugLog( $identifier, $msg, $level = 'DEBUG' ) {
+ $severity = constant( "WATCHDOG_$level" ); // Yep, they all
match!
+ watchdog( 'DonationInterface', "{$identifier}: {$msg}", NULL,
$severity );
}
static function getIP() {
diff --git a/gateway_common/WmfFramework.mediawiki.php
b/gateway_common/WmfFramework.mediawiki.php
index c062dcf..e9e24cc 100644
--- a/gateway_common/WmfFramework.mediawiki.php
+++ b/gateway_common/WmfFramework.mediawiki.php
@@ -1,7 +1,8 @@
<?php
class WmfFramework_Mediawiki {
- static function debugLog( $identifier, $msg ) {
+ static function debugLog( $identifier, $msg, $level = 'DEBUG' ) {
+ // TODO: call different wf*Log functions depending on $level
wfDebugLog( $identifier, $msg );
}
diff --git a/gateway_common/WmfFrameworkLogHandler.php
b/gateway_common/WmfFrameworkLogHandler.php
index 0afb718..67e59d4 100644
--- a/gateway_common/WmfFrameworkLogHandler.php
+++ b/gateway_common/WmfFrameworkLogHandler.php
@@ -28,6 +28,6 @@
}
protected function write( array $record ) {
- WmfFramework::debugLog( $this->identifier, $record['message'] );
+ WmfFramework::debugLog( $this->identifier, $record['message'],
$record['level_name'] );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/225257
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4ebb9cf36ec770d7cd487b05f2b4a9655fb7a99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits