Greetings, On Fri, Mar 8, 2013 at 8:38 PM, Jesse Farinacci <jie...@gmail.com> wrote: > I am using Java 7, IBM JRE and Apache Tomcat 7.0.37. I am seeing a > strange difference between java.util.logging.SimpleFormatter vs > org.apache.juli.OneLineFormatter: namely, for my applications, the > SimpleFormatter will produce log records with the Class name included > but OneLineFormatter will not. The exact same application, with only > changes to the .formatter are enough to show this change.
Thank you everyone for some good comments. I did not attach a formal debugger, but I was able to brute force narrow down where the problem is occurring: org.apache.juli.AsyncFileHandler. If I swap out org.apache.juli.AsyncFileHandler with org.apache.juli.FileHandler then the org.apache.juli.OneLineFormatter works just perfectly. Here is the working configuration: handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler .handlers = 1catalina.org.apache.juli.FileHandler 1catalina.org.apache.juli.FileHandler.level = ALL 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.FileHandler.prefix = catalina. 1catalina.org.apache.juli.FileHandler.formatter = org.apache.juli.OneLineFormatter 2localhost.org.apache.juli.FileHandler.level = ALL 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 2localhost.org.apache.juli.FileHandler.prefix = localhost. 2localhost.org.apache.juli.FileHandler.formatter = org.apache.juli.OneLineFormatter 3manager.org.apache.juli.FileHandler.level = ALL 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 3manager.org.apache.juli.FileHandler.prefix = manager. 3manager.org.apache.juli.FileHandler.formatter = org.apache.juli.OneLineFormatter org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = ALL org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = ALL org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler A swap to AsyncFileHandler shows the problem. Most times I see null.null for className and methodName, but sometimes the className is filled in and the methodName is null. So, perhaps, under heavy load, AsyncFileHandler doesn't behave predictably with respect to some LogRecord fields. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org