Not sure if this is the correct way to do it, but edit catalina.bat file
in the bin directory and add the log4j part below:

in catalina.bat:
set CATALINA_OPTS=%CATALINA_OPTS% -Dsun.io.useCanonCaches=false
-Dlog4j.configuration=log4j.xml

If that does not work, I would check the log4j mailing list.

 
 

> -----Original Message-----
> From: Vasumathi [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 28, 2005 5:56 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: RE: Regarding Log4j
> 
> Thank you very much sir.....
> 
> I am having one doubt.we are using Tomcat.can u tell me how 
> to configure log4j.xml in web.xml.i got the following 
> information already from u.bcoz i got server error when 
> deploying and starting the server.
> 
> 
> Quoting "JEEVANATHAM P.     /BPCRP/INFOTECH/VASHI" <[EMAIL PROTECTED]
> infotech.com>:
> 
> > 1.    Download log4j.jar from here
> > http://jakarta.apache.org/log4j/docs/download.html
> > 
> > Put the jar in web-inf/lib
> > 
> > 2.    Create log4j.xml in your WEB-INF/classes directory.
> > 
> > ++++++ sample log4j.xml +++++++++++++++++
> > 
> > *******************************************************
> > 
> > <?xml version="1.0" encoding="UTF-8" ?>
> > 
> > <!DOCTYPE log4j:configuration >
> > 
> >  
> > 
> > <log4j:configuration xmlns='http://logging.apache.org/'>
> > 
> >  
> > 
> >   <!-- Append log to the CONSOLE appender -->
> > 
> >   <appender name="console" class="org.apache.log4j.ConsoleAppender">
> > 
> >     <layout class="org.apache.log4j.PatternLayout">
> > 
> >       <param name="ConversionPattern" 
> > 
> > value="[%d{ISO8601}] [WEbAPP] [%5p] %C.%M:%L: %m%n"/>
> > 
> >     </layout>
> > 
> >   </appender>
> > 
> >  
> > 
> >   <root>
> > 
> >     <level value="debug"/>
> > 
> >     <appender-ref ref="console"/>
> > 
> >   </root>
> > 
> > </log4j:configuration>
> > 
> > ********************************************
> > 
> > 3.    Create instance for your class log4j
> > 
> > private Logger logger = Logger.getLogger(yourclass.class);
> > 
> >  
> > 
> > then you can any where in your class instead of 
> > System.out.println()any one of the below.
> > 
> > logger.debug();
> > 
> > logger.info();
> > 
> > logger.error();
> > 
> > logger.Warn();
> > 
> > logger.fetal();
> > 
> >  
> > 
> > that's all.
> > 
> >  
> > 
> > Regards,
> > 
> > Jeeva.P
> > 
> >  
> > 
> > -----Original Message-----
> > From: Vasumathi [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 28, 2005 9:28 AM
> > To: Struts Users Mailing List
> > Subject: Regarding Log4j
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > Hi Guys
> > 
> >   I am working on struts for last one year. In my current 
> project we 
> > are using
> > 
> > Log4j for Logger.i like to know how to configure and use in our 
> > application.
> > 
> > particularly we are using Ant tool.
> > 
> >  Anyone can help me please.
> > 
> > its very urgent please....
> > 
> > regards
> > 
> > vasumathi.p
> > 
> >  
> > 
> > 
> ---------------------------------------------------------------------
> > 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > 
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > --
> > Greetings!
> > 
> >  
> > 
> > 
> > ICICI Infotech is now 3i Infotech.
> > 
> > 
> > The e-mail addresses of the company's employees have been 
> changed to 
> > <existing name>@3i-infotech.com. You are requested to take note of 
> > this new e-mail ID and make use of the same in future
> > 
> >  
> > "This e-mail message may contain confidential, proprietary 
> or legally 
> > privileged information. It should not be used by anyone who 
> is not the 
> > original intended recipient. If you have erroneously received this 
> > message, please delete it immediately and notify the sender. The 
> > recipient acknowledges that 3i Infotech or its subsidiaries and 
> > associated companies, (collectively "3i Infotech"), are unable to 
> > exercise control or ensure or guarantee the integrity of/over the 
> > contents of the information contained in e-mail transmissions and 
> > further acknowledges that any views expressed in this message are 
> > those of the individual sender and no binding nature of the message 
> > shall be implied or assumed unless the sender does so 
> expressly with 
> > due authority of 3i Infotech. Before opening any 
> attachments please check them for viruses and defects."
> > 
> > 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to