Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/303964
Change subject: Rename 'authmanager' log channel to 'authevents' ...................................................................... Rename 'authmanager' log channel to 'authevents' Also, move some events which did not belong there to the 'authentication' channel. Change-Id: I4d7564343318899fc498ed2bd2d5260041ee22cc --- M includes/Setup.php M includes/api/ApiAuthManagerHelper.php M includes/api/ApiLogin.php M includes/specialpage/AuthManagerSpecialPage.php M includes/specials/SpecialCreateAccount.php M includes/specials/SpecialUserLogin.php M includes/user/User.php 7 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/64/303964/1 diff --git a/includes/Setup.php b/includes/Setup.php index 7909889..cbe4e2e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -840,7 +840,7 @@ true ); Profiler::instance()->scopedProfileOut( $ps_autocreate ); - \MediaWiki\Logger\LoggerFactory::getInstance( 'authmanager' )->info( 'Autocreation attempt', [ + \MediaWiki\Logger\LoggerFactory::getInstance( 'authevents' )->info( 'Autocreation attempt', [ 'event' => 'autocreate', 'status' => $res, ] ); diff --git a/includes/api/ApiAuthManagerHelper.php b/includes/api/ApiAuthManagerHelper.php index fe5675a..c970f93 100644 --- a/includes/api/ApiAuthManagerHelper.php +++ b/includes/api/ApiAuthManagerHelper.php @@ -238,7 +238,7 @@ } $module = $this->module->getModuleName(); - LoggerFactory::getInstance( 'authmanager' )->info( "$module API attempt", [ + LoggerFactory::getInstance( 'authevents' )->info( "$module API attempt", [ 'event' => $event, 'status' => $status, 'module' => $module, diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index b9f65b3..851252c 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -115,7 +115,7 @@ } else { $authRes = 'Failed'; $message = $status->getMessage(); - LoggerFactory::getInstance( 'authmanager' )->info( + LoggerFactory::getInstance( 'authentication' )->info( 'BotPassword login failed: ' . $status->getWikiText( false, false, 'en' ) ); } @@ -226,7 +226,7 @@ if ( $loginType === 'LoginForm' && isset( LoginForm::$statusCodes[$authRes] ) ) { $authRes = LoginForm::$statusCodes[$authRes]; } - LoggerFactory::getInstance( 'authmanager' )->info( 'Login attempt', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Login attempt', [ 'event' => 'login', 'successful' => $authRes === 'Success', 'loginType' => $loginType, diff --git a/includes/specialpage/AuthManagerSpecialPage.php b/includes/specialpage/AuthManagerSpecialPage.php index c889b73..85b8dc3 100644 --- a/includes/specialpage/AuthManagerSpecialPage.php +++ b/includes/specialpage/AuthManagerSpecialPage.php @@ -455,7 +455,7 @@ // passed to AuthManager. Normally we would display the form with an error message, // but for the data we received via the redirect flow that would not be helpful at all. // Let's just submit the data to AuthManager directly instead. - LoggerFactory::getInstance( 'authmanager' ) + LoggerFactory::getInstance( 'authentication' ) ->warning( 'Validation error on return', [ 'data' => $form->mFieldData, 'status' => $status->getWikiText() ] ); $status = $this->handleFormSubmit( $form->mFieldData ); diff --git a/includes/specials/SpecialCreateAccount.php b/includes/specials/SpecialCreateAccount.php index f06a192..2b43a49 100644 --- a/includes/specials/SpecialCreateAccount.php +++ b/includes/specials/SpecialCreateAccount.php @@ -159,7 +159,7 @@ } protected function logAuthResult( $success, $status = null ) { - LoggerFactory::getInstance( 'authmanager' )->info( 'Account creation attempt', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Account creation attempt', [ 'event' => 'accountcreation', 'successful' => $success, 'status' => $status, diff --git a/includes/specials/SpecialUserLogin.php b/includes/specials/SpecialUserLogin.php index 21f5659..253cd50 100644 --- a/includes/specials/SpecialUserLogin.php +++ b/includes/specials/SpecialUserLogin.php @@ -153,7 +153,7 @@ } protected function logAuthResult( $success, $status = null ) { - LoggerFactory::getInstance( 'authmanager' )->info( 'Login attempt', [ + LoggerFactory::getInstance( 'authevents' )->info( 'Login attempt', [ 'event' => 'login', 'successful' => $success, 'status' => $status, diff --git a/includes/user/User.php b/includes/user/User.php index 36526d7..7ba1d91 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -3768,7 +3768,7 @@ ScopedCallback::consume( $delay ); $error = false; } - \MediaWiki\Logger\LoggerFactory::getInstance( 'authmanager' )->info( 'Logout', [ + \MediaWiki\Logger\LoggerFactory::getInstance( 'authevents' )->info( 'Logout', [ 'event' => 'logout', 'successful' => $error === false, 'status' => $error ?: 'success', -- To view, visit https://gerrit.wikimedia.org/r/303964 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d7564343318899fc498ed2bd2d5260041ee22cc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits