8000 Making all "debug" messages use the debug router · symfony/symfony@5fa2684 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fa2684

Browse files
committed
Making all "debug" messages use the debug router
Only the "auth success" and "auth failed" messages remain at info. That's consistent with AbstractAuthenticationListener
1 parent f403444 commit 5fa2684

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct(GuardAuthenticatorHandler $guardHandler, Authenticat
6666
public function handle(GetResponseEvent $event)
6767
{
6868
if (null !== $this->logger) {
69-
$this->logger->info('Checking for guard authentication credentials.', array('firewall_key' => $this->providerKey, 'authenticators' => count($this->guardAuthenticators)));
69+
$this->logger->debug('Checking for guard authentication credentials.', array('firewall_key' => $this->providerKey, 'authenticators' => count($this->guardAuthenticators)));
7070
}
7171

7272
foreach ($this->guardAuthenticators as $key => $guardAuthenticator) {
@@ -77,7 +77,7 @@ public function handle(GetResponseEvent $event)
7777
$this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event);
7878

7979
if ($event->hasResponse()) {
80-
$this->logger->info(sprintf('The "%s" authenticator set the response. Any later authenticator will not be called', get_class($guardAuthenticator)));
80+
$this->logger->debug(sprintf('The "%s" authenticator set the response. Any later authenticator will not be called', get_class($guardAuthenticator)));
8181

8282
break;
8383
}
@@ -89,7 +89,7 @@ private function executeGuardAuthenticator($uniqueGuardKey, GuardAuthenticatorIn
8989
$request = $event->getRequest();
9090
try {
9191
if (null !== $this->logger) {
92-
$this->logger->info('Calling getCredentials on guard configurator.', array('firewall_key' => $this->providerKey, 'authenticator' => get_class($guardAuthenticator)));
92+
$this->logger->debug('Calling getCredentials() on guard configurator.', array('firewall_key' => $this->providerKey, 'authenticator' => get_class($guardAuthenticator)));
9393
}
9494

9595
// allow the authenticator to fetch authentication info from the request
@@ -104,7 +104,7 @@ private function executeGuardAuthenticator($uniqueGuardKey, GuardAuthenticatorIn
104104
$token = new PreAuthenticationGuardToken($credentials, $uniqueGuardKey);
105105

106106
if (null !== $this->logger) {
107-
$this->logger->info('Passing guard token information to the GuardAuthenticationProvider', array('firewall_key' => $this->providerKey, 'authenticator' => get_class($guardAuthenticator)));
107+
$this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', array('firewall_key' => $this->providerKey, 'authenticator' => get_class($guardAuthenticator)));
108108
}
109109
// pass the token into the AuthenticationManager system
110110
// this indirectly calls GuardAuthenticationProvider::authenticate()
@@ -136,13 +136,13 @@ private function executeGuardAuthenticator($uniqueGuardKey, GuardAuthenticatorIn
136136
$response = $this->guardHandler->handleAuthenticationSuccess($token, $request, $guardAuthenticator, $this->providerKey);
137137
if ($response instanceof Response) {
138138
if (null !== $this->logger) {
139-
$this->logger->info('Guard authenticator set success response.', array('response' => $response, 'authenticator' => get_class($guardAuthenticator)));
139+
$this->logger->debug('Guard authenticator set success response.', array('response' => $response, 'authenticator' => get_class($guardAuthenticator)));
140140
}
141141

142142
$event->setResponse($response);
143143
} else {
144144
if (null !== $this->logger) {
145-
$this->logger->info('Guard authenticator set no success response: request continues.', array('authenticator' => get_class($guardAuthenticator)));
145+
$this->logger->debug('Guard authenticator set no success response: request continues.', array('authenticator' => get_class($guardAuthenticator)));
146146
}
147147
}
148148

@@ -173,15 +173,15 @@ private function triggerRememberMe(GuardAuthenticatorInterface $guardAuthenticat
173173
{
174174
if (null === $this->rememberMeServices) {
175175
if (null !== $this->logger) {
176-
$this->logger->info('Remember me skipped: it is not configured for the firewall.', array('authenticator' => get_class($guardAuthenticator)));
176+
$this->logger->debug('Remember me skipped: it is not configured for the firewall.', array('authenticator' => get_class($guardAuthenticator)));
177177
}
178178

179179
return;
180180
}
181181

182182
if (!$guardAuthenticator->supportsRememberMe()) {
183183
if (null !== $this->logger) {
184-
$this->logger->info('Remember me skipped: your authenticator does not support it.', array('authenticator' => get_class($guardAuthenticator)));
184+
$this->logger->debug('Remember me skipped: your authenticator does not support it.', array('authenticator' => get_class($guardAuthenticator)));
185185
}
186186

187187
return;

0 commit comments

Comments
 (0)
0