diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php index a4e089154..14f217a41 100644 --- a/SimpleCaptcha/Captcha.php +++ b/SimpleCaptcha/Captcha.php @@ -272,7 +272,7 @@ class SimpleCaptcha { wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" ); return true; } - LoggerFactory::getInstance( 'authmanager' )->info( 'Captcha shown on account creation', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Captcha shown on account creation', [ 'event' => 'captcha.display', 'type' => 'accountcreation', ] ); @@ -322,7 +322,7 @@ class SimpleCaptcha { if ( $perIPTriggered || $perUserTriggered ) { global $wgOut; - LoggerFactory::getInstance( 'authmanager' )->info( 'Captcha shown on login', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Captcha shown on login', [ 'event' => 'captcha.display', 'type' => 'login', 'perIp' => $perIPTriggered, @@ -943,9 +943,7 @@ class SimpleCaptcha { if ( $this->needCreateAccountCaptcha() ) { $this->trigger = "new account '" . $u->getName() . "'"; $success = $this->passCaptchaLimitedFromRequest( $wgRequest, $wgUser ); - LoggerFactory::getInstance( - 'authmanager' - )->info( 'Captcha submitted on account creation', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Captcha submitted on account creation', [ 'event' => 'captcha.submit', 'type' => 'accountcreation', 'successful' => $success, @@ -1008,7 +1006,7 @@ class SimpleCaptcha { $this->trigger = "post-badlogin login '" . $u->getName() . "'"; $success = $this->passCaptchaLimitedFromRequest( $wgRequest, $wgUser ); - LoggerFactory::getInstance( 'authmanager' )->info( 'Captcha submitted on login', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Captcha submitted on login', [ 'event' => 'captcha.submit', 'type' => 'login', 'successful' => $success, @@ -1349,12 +1347,11 @@ class SimpleCaptcha { $this->addCaptchaAPI( $result ); $result['result'] = 'NeedCaptcha'; - LoggerFactory::getInstance( - 'authmanager' - )->info( 'Captcha data added in account creation API', [ - 'event' => 'captcha.display', - 'type' => 'accountcreation', - ] ); + LoggerFactory::getInstance( 'authevents' ) + ->info( 'Captcha data added in account creation API', [ + 'event' => 'captcha.display', + 'type' => 'accountcreation', + ] ); break; } diff --git a/includes/auth/CaptchaPreAuthenticationProvider.php b/includes/auth/CaptchaPreAuthenticationProvider.php index 9095368f2..d87785466 100644 --- a/includes/auth/CaptchaPreAuthenticationProvider.php +++ b/includes/auth/CaptchaPreAuthenticationProvider.php @@ -17,7 +17,7 @@ class CaptchaPreAuthenticationProvider extends AbstractPreAuthenticationProvider $needed = $captcha->needCreateAccountCaptcha( $user ?: new User() ); if ( $needed ) { $captcha->setAction( 'accountcreate' ); - LoggerFactory::getInstance( 'authmanager' ) + LoggerFactory::getInstance( 'authevents' ) ->info( 'Captcha shown on account creation', [ 'event' => 'captcha.display', 'type' => 'accountcreation', @@ -46,7 +46,7 @@ class CaptchaPreAuthenticationProvider extends AbstractPreAuthenticationProvider ) { $needed = true; $captcha->setAction( 'badlogin' ); - LoggerFactory::getInstance( 'authmanager' ) + LoggerFactory::getInstance( 'authevents' ) ->info( 'Captcha shown on account creation', [ 'event' => 'captcha.display', 'type' => 'accountcreation', @@ -74,7 +74,7 @@ class CaptchaPreAuthenticationProvider extends AbstractPreAuthenticationProvider $captcha->setAction( 'badlogin' ); $captcha->setTrigger( "post-badlogin login '$username'" ); $success = $this->verifyCaptcha( $captcha, $reqs, new User() ); - LoggerFactory::getInstance( 'authmanager' )->info( 'Captcha submitted on login', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Captcha submitted on login', [ 'event' => 'captcha.submit', 'type' => 'login', 'successful' => $success, @@ -99,7 +99,7 @@ class CaptchaPreAuthenticationProvider extends AbstractPreAuthenticationProvider $captcha->setAction( 'accountcreate' ); $captcha->setTrigger( "new account '$username'" ); $success = $this->verifyCaptcha( $captcha, $reqs, $user ); - LoggerFactory::getInstance( 'authmanager' )->info( 'Captcha submitted on account creation', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Captcha submitted on account creation', [ 'event' => 'captcha.submit', 'type' => 'accountcreation', 'successful' => $success,