I'm talking about application logging... In tomcat 5.5, when the level is set to DEBUG, a lot of messages are added in different situation (I'm only setting the root level for now to trace everything) : rendering jsp page, using the StAX xml parser, modify the context, parsing request, writing responses, etc... :
[...] DEBUG: org.apache.jasper.servlet.JspServlet - JspEngine --> /myPage.jsp DEBUG: org.apache.jasper.servlet.JspServlet - ServletPath: /admin DEBUG: org.apache.jasper.servlet.JspServlet - PathInfo: /myPage DEBUG: org.apache.jasper.servlet.JspServlet - RealPath: ...\webapps\my-webapp\myPage.jsp DEBUG: org.apache.jasper.servlet.JspServlet - RequestURI: /my-webapp/admin/myPage DEBUG: org.apache.jasper.servlet.JspServlet - QueryString: null DEBUG: org.apache.jasper.servlet.JspServlet - Request Params: DEBUG: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/my-webapp] - servletPath=/include/adminheader.jsp, pathInfo=null, queryString=null, name=null DEBUG: org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ my-webapp] - Path Based Include [...] Using the exact same webapp and the exact same use cases in tomcat 6, most of the logging produced is the same, but some messages are missing like everything that was before produced by JspServlet (exampel above)... My log4j configuration is really basic/simple: - commons-logging.properties has the following line org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4Jlogger - log4j.properties # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE # Set the enterprise logger priority to FATAL log4j.logger.org.apache.axis2.enterprise=FATAL log4j.logger.de.hunsicker.jalopy.io=FATAL log4j.logger.httpclient.wire.header=FATAL log4j.logger.org.apache.commons.httpclient=FATAL # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%p: %c - %m%n ________________________________ Guillaume Cauchon | DataDirect Technologies inc. -email: guillaume.cauc...@datadirect.com -mobile: 418.952-7357 -work: 418.649-1551 -----Original Message----- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, March 02, 2009 12:06 PM To: Tomcat Users List Subject: Re: Servlet API loggin in tomcat 5.5 vs. tomcat 6 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guillaume, On 2/27/2009 3:23 PM, Guillaume Cauchon wrote: > However we realized the logging configuration doesn't seams to be > working the same way! The same webapp running on 5.5 and 6 doesn't > produce the same amount of logging: everything that was produced by the > JspServlet (Servlet API) is missing now; and I guess a lot more is also > missing, but we didn't saw it yet... > > The logging is based on log4j, using a xml configuration file. We are > using DOMConfigurator to intitialise and monitor the log4j configuration > which can be modified at runtime. So, are you talking about application logging or Tomcat internal logging? You mentioned the JspServlet, but any logging performed by that servlet (that is, the actual log messages) is not part of the servlet API. If you use ServletContext.log(...) you aren't guaranteed (in fact, you are very unlikely) to use your application's logging mechanism. > I know the Common Logging if the basis of the whole logging architecture > in tomcat, is there something I need to know about the tomcat 6 release > that might be related to this issue? I'm not sure if there is an appreciable difference between logging configuration in Tomcat 5.5 and 6.0. Can you tell us what you expected and what actually happens? No log files created? No log messages generated? Log level is different than expected? You didn't give any real details except for "we upgraded and now it doesn't work". :( - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmsEdoACgkQ9CaO5/Lv0PCenACfdCDcRqYAjyriSFLCNYDA0gIG tawAn1JeKcALyKvKBHZg7D++m4kofbvi =WSiR -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org