LOGGING: Create a file called log4j.properties with the following content and save it into common/classes. log4j.rootLogger=DEBUG,R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m% --Container specific log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, --core specific log4j.logger.org.apache.catalina.core=DEBUG, R --session specific log4j.logger.org.apache.catalina.session=DEBUG, R
Download Log4J (v1.2 or later) and place the log4j jar in $CATALINA_HOME/common/lib. Download Commons Logging and place the commons-logging-x.y.z.jar (not commons-logging-api-x.y.z.jar) in $CATALINA_HOME/common/lib with the log4j jar.Start Tomcat Documentation is located at http://tomcat.apache.org/tomcat-5.5-doc/logging.html hth Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Subject: How to set Log4J debug flag in Tomcat > Date: Wed, 10 Dec 2008 19:31:09 -0500 > From: [EMAIL PROTECTED] > To: users@tomcat.apache.org > > How do I start tomcat as an application (not a service) and set the > log4j debug commandline parameter? > > I tried editing startup.bat to prepend -Dlog4j.debug to %CMD_LINE_ARGS%, > but I get the following error on startup, and I don't see any log4j > debug output: > > usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] > [ -nonaming ] { start | stop } > > Thanks for any help. > > Rebeccah > ------------------------------------------ > The contents of this message, together with any attachments, are > intended only for the use of the person(s) to which they are > addressed and may contain confidential and/or privileged > information. Further, any medical information herein is > confidential and protected by law. It is unlawful for unauthorized > persons to use, review, copy, disclose, or disseminate confidential > medical information. If you are not the intended recipient, > immediately advise the sender and delete this message and any > attachments. Any distribution, or copying of this message, or any > attachment, is prohibited. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008