Demote "throttler data not found" logs to info level

Bug: T158364
Change-Id: I049c2d6da4720341ef2a380879ac19aff444b1d0
This commit is contained in:
Gergő Tisza 2017-02-16 16:47:49 -08:00 committed by Gergő Tisza
parent fd5747ea16
commit 7dcefe4468
2 changed files with 4 additions and 2 deletions

View file

@ -167,7 +167,9 @@ class ThrottlePreAuthenticationProvider extends AbstractPreAuthenticationProvide
$data = $this->manager->getAuthenticationSessionData( 'LoginThrottle' );
if ( !$data ) {
$this->logger->error( 'throttler data not found for {user}', [ 'user' => $user->getName() ] );
// this can occur when login is happening via AuthenticationRequest::$loginRequest
// so testForAuthentication is skipped
$this->logger->info( 'throttler data not found for {user}', [ 'user' => $user->getName() ] );
return;
}

View file

@ -226,7 +226,7 @@ class ThrottlePreAuthenticationProviderTest extends \MediaWikiTestCase {
$provider->postAuthentication( \User::newFromName( 'SomeUser' ),
AuthenticationResponse::newPass() );
$this->assertSame( [
[ \Psr\Log\LogLevel::ERROR, 'throttler data not found for {user}' ],
[ \Psr\Log\LogLevel::INFO, 'throttler data not found for {user}' ],
], $logger->getBuffer() );
}
}