3 Replies Latest reply on Jan 23, 2019 10:25 PM by jaikiran

    Wildfly 10.1 is logging all the response body in the server log file. How do I eliminate the unnecessary logs and log only application specific messages.

    anil-pcc

      Hello,

       

      Wildfly 10.1 is logging all the response body in the server log file. How do I eliminate the unnecessary logs and log only application specific messages.

       

      for example: server.log is printing below response body,

       

       

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1681 copying 4 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1682 read class attr -- 'getStreetName'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1683 copying 2 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1684 read class attr -- '  <input type="hidden" name="DOB" value="'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1685 copying 4 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1686 copying 4 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1687 read class attr -- 'getDtOfBirth'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1688 copying 2 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1689 read class attr -- '  <input type="hidden" name="SEARCHTYPE" value="'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1690 copying 2 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1691 read class attr -- '  <input type="hidden" name="LOCALTOWNIDENTIFIER" value="'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1692 copying 4 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1693 copying 4 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1694 read class attr -- 'getLocatTownId'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1695 copying 2 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1696 read class attr -- '  <input type="hidden" name="TOWNNAME" value="'

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1697 copying 4 bytes

      2019-01-22 12:25:37,694 DEBUG [org.apache.jasper.compiler.SmapUtil$SDEInstaller] (default task-6) 1698 copying 4 bytes

       

       

      I want only my application logs to be printed in Server.log

       

      Any Solution? Thanks in advance.

        • 1. Re: Wildfly 10.1 is logging all the response body in the server log file. How do I eliminate the unnecessary logs and log only application specific messages.
          jaikiran

          It looks like the logging subsystem configuration of your server has been updated to allow these logs to be logged. By default, I don't think the org.apache.jasper library logs are logged at DEBUG level. What does your logging subsystem configuration look like in the standalone/domain configuration of the server?

          • 2. Re: Wildfly 10.1 is logging all the response body in the server log file. How do I eliminate the unnecessary logs and log only application specific messages.
            anil-pcc

            Thanks for your reply Jai Kiran,

             

             

            I didn't any changes to standalone.xml I am using default configuration,

             

             

             

            <subsystem xmlns="urn:jboss:domain:logging:3.0">

                        <console-handler name="CONSOLE">

                            <level name="INFO"/>

                            <formatter>

                                <named-formatter name="COLOR-PATTERN"/>

                            </formatter>

                        </console-handler>

                        <periodic-rotating-file-handler name="FILE" autoflush="true">

                            <formatter>

                                <named-formatter name="PATTERN"/>

                            </formatter>

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

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

                            <append value="true"/>

                        </periodic-rotating-file-handler>

                        <logger category="com.arjuna">

                            <level name="WARN"/>

                        </logger>

                        <logger category="org.jboss.as.config">

                            <level name="DEBUG"/>

                        </logger>

                        <logger category="sun.rmi">

                            <level name="WARN"/>

                        </logger>

                        <root-logger>

                            <level name="INFO"/>

                            <handlers>

                                <handler name="CONSOLE"/>

                                <handler name="FILE"/>

                            </handlers>

                        </root-logger>

                        <formatter name="PATTERN">

                            <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>

                        </formatter>

                        <formatter name="COLOR-PATTERN">

                            <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>

                        </formatter>

                    </subsystem>

            • 3. Re: Wildfly 10.1 is logging all the response body in the server log file. How do I eliminate the unnecessary logs and log only application specific messages.
              jaikiran

              Is there any log4j.properties or log4j.xml file (or any other logging library configuration files) in your deployed application? Maybe that configuration is what is contributing to these logs? I have never seen these logs in WildFly with many of the applications that I have had a chance to look into.