1

How do I enable logging for Spring Security in grails 2.2.3 ?

I what to see the full log of spring security. I trying to handle it on onAuthenticationFailure method but did not worked

public void onAuthenticationFailure(final HttpServletRequest request, final HttpServletResponse response,
            final AuthenticationException exception) throws IOException, ServletException {

        ObjectMapper objectMapper = new ObjectMapper();

        if (SpringSecurityUtils.isAjax(request)) {
            saveException(request, exception);
            getRedirectStrategy().sendRedirect(request, response, _ajaxAuthenticationFailureUrl);
        }
        else {
            super.onAuthenticationFailure(request, response, exception);
        }

    }
arash yousefi
  • 376
  • 5
  • 16

1 Answers1

0

you could set the log level to debug for root in your project so it would log everything or you could set it only for springsecurity. try this link : How do I enable logging for Spring Security?

arash yousefi
  • 376
  • 5
  • 16