diff options
author | Iltar van der Berg <ivanderberg@hostnet.nl> | 2015-01-15 10:04:56 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-01-16 16:11:12 +0100 |
commit | e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9 (patch) | |
tree | e10eb6b1d244406d98830beef59756c65088b154 /Http/Authentication | |
parent | 000c29c2deaea9e4ea3e30ee7ac5409a7090b2da (diff) | |
download | symfony-security-e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9.zip symfony-security-e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9.tar.gz symfony-security-e26eec7c5599a8ab6fd2b5c448e97970f2db3cf9.tar.bz2 |
[DX] Attempt to improve logging messages with parameters
Diffstat (limited to 'Http/Authentication')
-rw-r--r-- | Http/Authentication/DefaultAuthenticationFailureHandler.php | 4 | ||||
-rw-r--r-- | Http/Authentication/SimpleAuthenticationHandler.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Http/Authentication/DefaultAuthenticationFailureHandler.php b/Http/Authentication/DefaultAuthenticationFailureHandler.php index 8864dae..f8004d6 100644 --- a/Http/Authentication/DefaultAuthenticationFailureHandler.php +++ b/Http/Authentication/DefaultAuthenticationFailureHandler.php @@ -92,7 +92,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle if ($this->options['failure_forward']) { if (null !== $this->logger) { - $this->logger->debug(sprintf('Forwarding to %s', $this->options['failure_path'])); + $this->logger->debug('Authentication failure, forward triggered.', array('failure_path' => $this->options['failure_path'])); } $subRequest = $this->httpUtils->createRequest($request, $this->options['failure_path']); @@ -102,7 +102,7 @@ class DefaultAuthenticationFailureHandler implements AuthenticationFailureHandle } if (null !== $this->logger) { - $this->logger->debug(sprintf('Redirecting to %s', $this->options['failure_path'])); + $this->logger->debug('Authentication failure, redirect triggered.', array('failure_path' => $this->options['failure_path'])); } $request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception); diff --git a/Http/Authentication/SimpleAuthenticationHandler.php b/Http/Authentication/SimpleAuthenticationHandler.php index 09a55ef..6a1311f 100644 --- a/Http/Authentication/SimpleAuthenticationHandler.php +++ b/Http/Authentication/SimpleAuthenticationHandler.php @@ -57,7 +57,7 @@ class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterfa { if ($this->simpleAuthenticator instanceof AuthenticationSuccessHandlerInterface) { if ($this->logger) { - $this->logger->debug(sprintf('Using the %s object as authentication success handler', get_class($this->simpleAuthenticator))); + $this->logger->debug('Selected an authentication success handler.', array('handler' => get_class($this->simpleAuthenticator))); } $response = $this->simpleAuthenticator->onAuthenticationSuccess($request, $token); @@ -71,7 +71,7 @@ class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterfa } if ($this->logger) { - $this->logger->debug('Fallback to the default authentication success handler'); + $this->logger->debug('Fallback to the default authentication success handler.'); } return $this->successHandler->onAuthenticationSuccess($request, $token); @@ -84,7 +84,7 @@ class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterfa { if ($this->simpleAuthenticator instanceof AuthenticationFailureHandlerInterface) { if ($this->logger) { - $this->logger->debug(sprintf('Using the %s object as authentication failure handler', get_class($this->simpleAuthenticator))); + $this->logger->debug('Selected an authentication failure handler.', array('handler' => get_class($this->simpleAuthenticator))); } $response = $this->simpleAuthenticator->onAuthenticationFailure($request, $exception); @@ -98,7 +98,7 @@ class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterfa } if ($this->logger) { - $this->logger->debug('Fallback to the default authentication failure handler'); + $this->logger->debug('Fallback to the default authentication failure handler.'); } return $this->failureHandler->onAuthenticationFailure($request, $exception); |