core-bundle/src/Security/Authentication/AuthenticationFailureHandler.php
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response
    {
        if (null === $this->logger) {
            return parent::onAuthenticationFailure($request, $exception);
        }

        if ($exception instanceof AccountStatusException && ($user = $exception->getUser()) instanceof UserInterface) {
            $username = $user->getUsername();
        } else {
            $username = $request->request->get('username');
        }

        $this->logger->info(
            $exception->getMessage(),
            ['contao' => new ContaoContext(__METHOD__, ContaoContext::ACCESS, $username)]
        );

        return parent::onAuthenticationFailure($request, $exception);
    }
public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response
    {
        if (null === $this->logger) {
            return parent::onAuthenticationFailure($request, $exception);
        }

        if ($exception instanceof AccountStatusException && ($user = $exception->getUser()) instanceof UserInterface) {
            $username = $user->getUsername();
        } else {
            $username = $request->request->get('username');
        }

        $this->logger->info(
            $exception->getMessage(),
            ['contao' => new ContaoContext(__METHOD__, ContaoContext::ACCESS, $username)]
        );

        return parent::onAuthenticationFailure($request, $exception);
    }
Logs the security exception to the Contao back end.

@throws \RuntimeException