1 Reply Latest reply on Nov 28, 2017 7:29 AM by jaikiran pai

    Filter in wildfly log

    johnsi george Newbie

      Requirement :

                              To filter error message/exception into another log named errorlog.log other than server.log

      Configuration :

      <periodic-rotating-file-handler name="errorjohn">

                  <level name="ERROR"/>

      <filter-spec value="match(&quot;UT005023:*&quot;)"/> 


                      <named-formatter name="PATTERN"/>


                  <file relative-to="jboss.server.log.dir" path="errorlog.log"/>

                  <suffix value=".yyyy-MM-dd"/>


      <logger category="errortest" use-parent-handlers="false">

                      <level name="ERROR"/>


                          <handler name="CONSOLE"/>

                          <handler name="errorjohn"/>



      Error In server Log:

      17:23:45,696 ERROR [io.undertow.request] (default task-4) UT005023: Exception ha

      ndling request to /Testsporacle/testing: java.lang.NoSuchMethodError: com.nfr.sv


      No error starting with UT005023: is logged in errorlog.log.

      ApplicationServer used: wildfly 10.0

        • 1. Re: Filter in wildfly log
          jaikiran pai Master

          <logger category="errortest"

          The category value should match the category of the logger which logs the message. In your example it either should be "io.undertow" or if you want specifically for undertow request logger category then it should be "io.undertow.request" (as you can see from the logged message).