Re: Tomcat DEBUG log4j and 5.5.4?
Getting log4j logging running in Tomcat-5.5.x is pretty simple. Here's what you need... 1. Put log4j.jar in common/lib 2. Put commons-logging.jar (not commons-logging-api.jar!) in common/lib 3. Put log4j.xml or log4j.properties in common/classes You'll want to look at the new naming scheme for Host and Context loggers in the 5.5 docs. Note that if you are using log4j-1.2.x, you can't use log4j.xml because of the way the Host and Context loggers are named. They use characters that conflict with what the XML spec defines as allowed characters for an attribute of type ID. What I mean is the logger name attribute, which is of type ID when using the DOMConfigurator. Log4j-1.3 deprecates the DOMConfigurator in favor of the JoranConfigurator which doesn't validate against a DTD, so there is no conflict there. For now, just use the properties format. Here's a sample log4j.properties... log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-5p[%-8.8t]: %39.39c %-6r - %m%n #log4j.appender.A2=org.apache.log4j.FileAppender #log4j.appender.A2.File=${catalina.home}/logs/stdout.log #log4j.appender.A2.Append=false #log4j.appender.A2.layout=org.apache.log4j.PatternLayout #log4j.appender.A2.layout.ConversionPattern=%-5p[%-8.8t]: %39.39c %-6r - %m%n log4j.appender.LOCALHOST=org.apache.log4j.RollingFileAppender log4j.appender.LOCALHOST.File=${catalina.home}/logs/localhost.log log4j.appender.LOCALHOST.MaxFileSize=1000KB log4j.appender.LOCALHOST.MaxBackupIndex=1 log4j.appender.LOCALHOST.layout=org.apache.log4j.PatternLayout log4j.appender.LOCALHOST.layout.ConversionPattern=%-5p[%-8.8t]: %39.39c %-6r - %m%n log4j.appender.SOMEAPP=org.apache.log4j.DailyRollingFileAppender log4j.appender.SOMEAPP.File=${catalina.home}/logs/localhost_someapp.log log4j.appender.SOMEAPP.DatePattern='.'-MM-dd log4j.appender.SOMEAPP.layout=org.apache.log4j.PatternLayout log4j.appender.SOMEAPP.layout.ConversionPattern=%c{1} %-6r - %m%n log4j.appender.ANOTHERAPP=org.apache.log4j.DailyRollingFileAppender log4j.appender.ANOTHERAPP.File=${catalina.home}/logs/localhost_anotherapp.log log4j.appender.ANOTHERAPP.DatePattern='.'-MM-dd log4j.appender.ANOTHERAPP.layout=org.apache.log4j.PatternLayout log4j.appender.ANOTHERAPP.layout.ConversionPattern=%c{1} %-6r - %m%n log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/someapp]=DEBUG, SOMEAPP log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/someapp]=false log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/anotherapp]=INFO, ANOTHERAPP log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/anotherapp]=false log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO, LOCALHOST log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=false log4j.rootLogger=INFO, A1 Jake Quoting Kevin A. Burton [EMAIL PROTECTED]: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html Does this actually work? I followed the steps for log4j and it won't work at all. I still get the standard logging. Are there any properties settings I can use to get more info on the bootstrap process? Kevin -- Use Rojo (RSS/Atom aggregator). Visit http://rojo.com. Ask me for an invite! Also see irc.freenode.net #rojo if you want to chat. Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html If you're interested in RSS, Weblogs, Social Networking, etc... then you should work for Rojo! If you recommend someone and we hire them you'll get a free iPod! Kevin A. Burton, Location - San Francisco, CA AIM/YIM - sfburtonator, Web - http://peerfear.org/ GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Debug.
On Thu, 2003-02-13 at 05:28, João Augusto Charnet wrote: Is it possible to set Tomcat to listen to diferent ports when debugging ? What I do with roughly 12 developers is that I add a logger for each user that logs to each developers web app directory. They use the admin interface to restart/redeploy their own context. Not sure if this is exactly what you want... Ben Ricker Here's the problem. We have a group of developers, who acesses tomcat remotely in one machine. Each developer accesses one context of Tomcat. However to Debug, since Tomcat uses one port, when somebody is debugging, the execution of the entire group is going to be in debug mode. This is not interesting. What we want is to each developer have it's own debug port. Did I make myself clear ? If not please let me know. Thanks a lot... Sincerely, John. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Ricker [EMAIL PROTECTED] Wellinx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Debug.
I'm not sure what the logger is used for. What I want is to have diferent developers debugging the application on the same Tomcat. For this to happen I wanted to tell Tomcat to listen to serveral ports in Debugging mode. So that each developer has it's own debug port from Tomcat. Thanks. John. Ben Ricker wrote: On Thu, 2003-02-13 at 05:28, João Augusto Charnet wrote: Is it possible to set Tomcat to listen to diferent ports when debugging ? What I do with roughly 12 developers is that I add a logger for each user that logs to each developers web app directory. They use the admin interface to restart/redeploy their own context. Not sure if this is exactly what you want... Ben Ricker Here's the problem. We have a group of developers, who acesses tomcat remotely in one machine. Each developer accesses one context of Tomcat. However to Debug, since Tomcat uses one port, when somebody is debugging, the execution of the entire group is going to be in debug mode. This is not interesting. What we want is to each developer have it's own debug port. Did I make myself clear ? If not please let me know. Thanks a lot... Sincerely, John. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Debug.
The Java VM doesn't really support that. Why not let them each run their own instance of Tomcat? -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: João Augusto Charnet [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 10:33 AM To: Tomcat Users List Subject: Re: Tomcat Debug. I'm not sure what the logger is used for. What I want is to have diferent developers debugging the application on the same Tomcat. For this to happen I wanted to tell Tomcat to listen to serveral ports in Debugging mode. So that each developer has it's own debug port from Tomcat. Thanks. John. Ben Ricker wrote: On Thu, 2003-02-13 at 05:28, João Augusto Charnet wrote: Is it possible to set Tomcat to listen to diferent ports when debugging ? What I do with roughly 12 developers is that I add a logger for each user that logs to each developers web app directory. They use the admin interface to restart/redeploy their own context. Not sure if this is exactly what you want... Ben Ricker Here's the problem. We have a group of developers, who acesses tomcat remotely in one machine. Each developer accesses one context of Tomcat. However to Debug, since Tomcat uses one port, when somebody is debugging, the execution of the entire group is going to be in debug mode. This is not interesting. What we want is to each developer have it's own debug port. Did I make myself clear ? If not please let me know. Thanks a lot... Sincerely, John. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]