Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-661

Missing information how to configure log4j in Tomcat

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • JWS 3.1.0 GA
    • doc-Installation-Guide
    • None

      Project doc [1] mention following options:

      • Default JULI - for all logging (Tomcat internals and applications)
      • log4j - Applications only
      • log4j - Tomcat internals and applications

      Default JULI - for all logging (Tomcat internals and applications)

      • This is default behavior, no additional effort is needed - for details see [2]

      Log4j - Applications only

      • cp JWS_HOME/extras/log4j-eap6.jar WEBAPP_PATH/WEB-INF/lib
      • cp JWS_HOME/extras/log4j.properties WEBAPP_PATH/WEB-INF/classes
      • more details [3]

      Log4j - Tomcat internals and applications

      • cp JWS_HOME/extras/log4j-eap6.jar CATALINA_HOME/lib
      • cp JWS_HOME/extras/log4j.properties CATALINA_HOME/lib
      • cp JWS_HOME/tomcatX/tomcat-juli.jar CATALINA_HOME/bin
      • cp JWS_HOME/tomcatX/tomcat-juli-adapters.jar CATALINA_HOME/lib
      • Tomcat's internal logging will be present in CATALINA_HOME/logs/tomcat.log
      • Web applications should certainly use their own log4j configuration
      • more details [3]
      • WARN: There is issue https://issues.jboss.org/browse/JWS-653 affecting described setup

      [1] https://tomcat.apache.org/tomcat-8.0-doc/logging.html
      [2] https://tomcat.apache.org/tomcat-8.0-doc/logging.html#Using_java.util.logging_(default)
      [3] https://tomcat.apache.org/tomcat-8.0-doc/logging.html#Using_Log4j

              tkelly@redhat.com Tyler Kelly (Inactive)
              jstefl@redhat.com Jan Štefl
              Jan Štefl Jan Štefl
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: