Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/273849

Change subject: Add some debug logging to thank-you-edit notifications
......................................................................

Add some debug logging to thank-you-edit notifications

Bug: T128249
Change-Id: I074cfa51e1d45a6dcc5a1316ef4e83e20319f8a6
---
M Hooks.php
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/49/273849/1

diff --git a/Hooks.php b/Hooks.php
index 9c9bd98..87d5726 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\Logger\LoggerFactory;
+
 class EchoHooks {
        const EMAIL_NEVER = -1; // Never send email notifications
        const EMAIL_IMMEDIATELY = 0; // Send email notificaitons immediately as 
they come in
@@ -459,6 +461,14 @@
                        // This edit hasn't been added to the edit count yet
                        $editCount = $user->getEditCount() + 1;
                        if ( in_array( $editCount, $thresholds ) ) {
+                               LoggerFactory::getInstance( 'Echo' )->debug(
+                                       'Thanking {user} (id: {id}) for their 
{count} edit',
+                                       array(
+                                               'user' => $user->getName(),
+                                               'id' => $user->getId(),
+                                               'count' => $editCount,
+                                       )
+                               );
                                DeferredUpdates::addCallableUpdate( function () 
use ( $user, $title, $editCount ) {
                                        EchoEvent::create( array(
                                                        'type' => 
'thank-you-edit',

-- 
To view, visit https://gerrit.wikimedia.org/r/273849
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I074cfa51e1d45a6dcc5a1316ef4e83e20319f8a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to