Rename 'authmanager' log channel to 'authevents'
authorGergő Tisza <gtisza@wikimedia.org>
Wed, 10 Aug 2016 01:32:28 +0000 (01:32 +0000)
committerGergő Tisza <gtisza@wikimedia.org>
Wed, 10 Aug 2016 01:32:28 +0000 (01:32 +0000)
Also, move some events which did not belong there to the
'authentication' channel.

Change-Id: I4d7564343318899fc498ed2bd2d5260041ee22cc

includes/Setup.php
includes/api/ApiAuthManagerHelper.php
includes/api/ApiLogin.php
includes/specialpage/AuthManagerSpecialPage.php
includes/specials/SpecialCreateAccount.php
includes/specials/SpecialUserLogin.php
includes/user/User.php

index 7909889..cbe4e2e 100644 (file)
@@ -840,7 +840,7 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
                        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,
                ] );
index fe5675a..c970f93 100644 (file)
@@ -238,7 +238,7 @@ class ApiAuthManagerHelper {
                }
 
                $module = $this->module->getModuleName();
-               LoggerFactory::getInstance( 'authmanager' )->info( "$module API attempt", [
+               LoggerFactory::getInstance( 'authevents' )->info( "$module API attempt", [
                        'event' => $event,
                        'status' => $status,
                        'module' => $module,
index b9f65b3..851252c 100644 (file)
@@ -115,7 +115,7 @@ class ApiLogin extends ApiBase {
                        } 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 @@ class ApiLogin extends ApiBase {
                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,
index c889b73..85b8dc3 100644 (file)
@@ -455,7 +455,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
                                // 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 );
index f06a192..2b43a49 100644 (file)
@@ -159,7 +159,7 @@ class SpecialCreateAccount extends LoginSignupSpecialPage {
        }
 
        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,
index 21f5659..253cd50 100644 (file)
@@ -153,7 +153,7 @@ class SpecialUserLogin extends LoginSignupSpecialPage {
        }
 
        protected function logAuthResult( $success, $status = null ) {
-               LoggerFactory::getInstance( 'authmanager' )->info( 'Login attempt', [
+               LoggerFactory::getInstance( 'authevents' )->info( 'Login attempt', [
                        'event' => 'login',
                        'successful' => $success,
                        'status' => $status,
index 36526d7..7ba1d91 100644 (file)
@@ -3768,7 +3768,7 @@ class User implements IDBAccessObject {
                        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',