Merge pull request #156 from nextcloud/more-logging-for-debugging

More logging for debugging
This commit is contained in:
Lukas Reschke 2017-09-21 18:29:56 +02:00 committed by GitHub
commit 0187682be9

View file

@ -208,6 +208,7 @@ class SAMLController extends Controller {
}
if (!$auth->isAuthenticated()) {
$this->logger->info('Auth failed', ['app' => $this->appName]);
return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned'));
}
@ -216,6 +217,7 @@ class SAMLController extends Controller {
try {
$this->autoprovisionIfPossible($auth->getAttributes());
} catch (NoUserFoundException $e) {
$this->logger->info('User not found', ['app' => $this->appName]);
return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned'));
}
@ -230,6 +232,7 @@ class SAMLController extends Controller {
}
$user->updateLastLoginTimestamp();
} catch (\Exception $e) {
$this->logger->logException($e, ['app' => $this->appName]);
return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned'));
}