2 Replies Latest reply on Mar 22, 2007 10:25 AM by tom_goring

    Do we need failed page access logged as ERROR

    alex.kozlenkov

      I'm not sure it was like this before but accessing a restricted page while not logged in dumps the stack trace into the ERROR channel.

      09:48:59,808 ERROR [SeamPhaseListener] uncaught exception
      org.jboss.seam.security.NotLoggedInException
       at org.jboss.seam.security.Identity.checkRestriction(Identity.java:156)
       at org.jboss.seam.pages.Page.enter(Page.java:203)
      ...
      This is due to Line 69 in SeamPhaseListener:
      log.error("uncaught exception", e);

      Do we really need it?
      Cheers--Alex

        • 1. Re: Do we need failed page access logged as ERROR

          I´d also prefer not to log the whole exception as this is more like a standard-issue and logging the whole stack-trace always looks like having a problem or a bug in the application, which is not really the case if the user is not logged in.

          Thomas

          • 2. Re: Do we need failed page access logged as ERROR
            tom_goring

            Hi All,

            I have a related issue,

            If in pages.xml I define:

             <exception class="javax.persistence.OptimisticLockException">
             <redirect view-id="/user_error.xhtml">
             <message>Sorry but someone else has updated that record.</message>
             </redirect>
             </exception>
            


            I'd like to NOT see an exception in the server log.
            Could we have a flag in pages.xml or something to say suppressLogging ?

            Thanks

            Tom