11diff --git a/src/Controller/Oauth2Token.php b/src/Controller/Oauth2Token.php
2- index a00f01b..9811498 100644
32--- a/src/Controller/Oauth2Token.php
43+++ b/src/Controller/Oauth2Token.php
54@@ -69,7 +69,7 @@ class Oauth2Token extends ControllerBase {
@@ -11,3 +10,40 @@ index a00f01b..9811498 100644
1110 $response = $exception->generateHttpResponse(new Response());
1211 }
1312 return $response;
13+ diff --git a/src/Authentication/Provider/SimpleOauthAuthenticationProvider.php b/src/Authentication/Provider/SimpleOauthAuthenticationProvider.php
14+ --- a/src/Authentication/Provider/SimpleOauthAuthenticationProvider.php
15+ +++ b/src/Authentication/Provider/SimpleOauthAuthenticationProvider.php
16+ @@ -4,6 +4,7 @@ namespace Drupal\simple_oauth\Authentication\Provider;
17+
18+ use Drupal\Core\Authentication\AuthenticationProviderInterface;
19+ use Drupal\Core\Entity\EntityTypeManagerInterface;
20+ + use Drupal\Core\Logger\LoggerChannelTrait;
21+ use Drupal\Core\StringTranslation\StringTranslationTrait;
22+ use Drupal\simple_oauth\Authentication\TokenAuthUser;
23+ use Drupal\simple_oauth\PageCache\SimpleOauthRequestPolicyInterface;
24+ @@ -18,6 +19,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
25+ class SimpleOauthAuthenticationProvider implements AuthenticationProviderInterface {
26+
27+ use StringTranslationTrait;
28+ + use LoggerChannelTrait;
29+
30+ /**
31+ * @var \Drupal\simple_oauth\Server\ResourceServerInterface
32+ @@ -79,7 +81,7 @@ class SimpleOauthAuthenticationProvider implements AuthenticationProviderInterfa
33+ }
34+ catch (OAuthServerException $exception) {
35+ // Procedural code here is hard to avoid.
36+ - watchdog_exception('simple_oauth', $exception);
37+ + $this->getLogger('simple_oauth')->error($exception->getMessage(), ['exception' => $exception]);
38+
39+ throw new HttpException(
40+ $exception->getHttpStatusCode(),
41+ @@ -106,7 +108,7 @@ class SimpleOauthAuthenticationProvider implements AuthenticationProviderInterfa
42+ ['%name' => $account->getAccountName()]
43+ )
44+ );
45+ - watchdog_exception('simple_oauth', $exception);
46+ + $this->getLogger('simple_oauth')->error($exception->getMessage(), ['exception' => $exception]);
47+ throw new HttpException(
48+ $exception->getHttpStatusCode(),
49+ $exception->getHint(),
0 commit comments