Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-101

logging-profile works for a servlet, but doesn't for a JSP

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Alpha9
    • None
    • Logging
    • None
    • Hide
      1. Set the logging-profile in the description to a standalone instance.
      2. Deploy attached web app, logone/target/logone.war.
      3. Access a servlet, curl http://localhost:8080/logone/HogeServlet. Its log message appears in standalone/log/logone.log, as expected.
      4. Access a JSP, curl http://localhost:8080/logone/index.jsp. Its log message appears in standalone/log/server.log and CONSOLE, unexpectedly.
      Show
      Set the logging-profile in the description to a standalone instance. Deploy attached web app, logone/target/logone.war. Access a servlet, curl http://localhost:8080/logone/HogeServlet . Its log message appears in standalone/log/logone.log, as expected. Access a JSP, curl http://localhost:8080/logone/index.jsp . Its log message appears in standalone/log/server.log and CONSOLE, unexpectedly.

      Suppose the following logging-profile has been set in logging subsystem, and a web app has a proper entry in its MANIFEST.MF (Logging-Profile: logone). Then all messages via "com.example.logone" logger should go into a file, logone.log. It does so with a logger got in a servlet, but it doesn't work a logger got in a JSP.

                  <logging-profiles>
                      <logging-profile name="logone">
                          <file-handler name="logone">
                              <level name="INFO"/>
                              <file relative-to="jboss.server.log.dir" path="logone.log"/>
                          </file-handler>
                          <logger category="com.example.logone">
                              <level name="INFO"/>
                          </logger>
                          <root-logger>
                              <level name="INFO"/>
                              <handlers>
                                  <handler name="logone"/>
                              </handlers>
                          </root-logger>
                      </logging-profile>
                  </logging-profiles>
      

              jperkins-rhn James Perkins
              rhn-support-onagano Osamu Nagano
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: