Re: regarding log4j
Good Call- Also ..the JAVA_OPTS env var can identify the location e.g. JAVA_OPTS= -Dlog4j.configuration=log4j.xml HTH - Original Message - From: "Holger Moosbauer" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, January 02, 2006 8:41 AM Subject: AW: regarding log4j Tomcat can't find the log4j.properties. Put the file in the classes directory of your web application. e.g. -> og4j.rootCategory = INFO, stdout, fileout log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern = %5p [%t] (%F:%L) - %m%n log4j.appender.fileout = org.apache.log4j.FileAppender log4j.appender.fileout.layout = org.apache.log4j.HTMLLayout log4j.appender.fileout.append = false log4j.appender.fileout.File = $TOMCAT_HOME$/logs/ticr.htm Hope that helps ... bye -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Montag, 2. Januar 2006 14:24 An: user@struts.apache.org Betreff: regarding log4j I am using Tomcat5, When I start the Tomcat i faace like this. I am using log4j log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. inside the init method using log fileC:\Tomcat5\webapps\catalogServer\WEB-INF/classes/log4j.properties 2006-01-02 19:06:27,140 org.apache.coyote.http11.Http11Protocol INFO : Starting Coyote HTTP/1.1 on http-8080 2006-01-02 19:06:27,375 org.apache.jk.common.ChannelSocket INFO : JK2: ajp13 listening on /0.0.0.0:8009 2006-01-02 19:06:27,375 org.apache.jk.server.JkMain INFO : Jk running ID=0 time=0/32 config=C:\Tomcat5\conf\jk2.properties 2006-01-02 19:06:27,421 org.apache.catalina.startup.Catalina INFO : Server startup in 5250 ms Is it correct for deployment Any one help me - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Regarding Log4j
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 + > > > > *** > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >> > > value="[%d{ISO8601}] [WEbAPP] [%5p] %C.%M:%L: %m%n"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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 > > @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]
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 + > > *** > > > > > > > > > > > > > > > > > > > value="[%d{ISO8601}] [WEbAPP] [%5p] %C.%M:%L: %m%n"/> > > > > > > > > > > > > > > > > > > > > 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 > @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]
RE: Regarding Log4j
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 + *** 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 @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."
Re: Regarding Log4j
log4j.properties --- # An example log4j configuration file that outputs to System.out. The # output information consists of relative time, log level, thread # name, logger name, nested diagnostic context and the message in that # order. # For the general syntax of property based configuration files see the # documenation of org.apache.log4j.PropertyConfigurator. log4j.rootLogger=INFO,stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{dd-MMM-:HH:mm:ss} %t [%M] %p --- %m%n Log4JTest.java --- import org.apache.log4j.*; public class Log4JTest { static Logger logger = null; static { try { logger = Logger.getLogger (Log4JTest.class); PropertyConfigurator.configure( "./log4j.properties" ); //BasicConfigurator.configure(); //logger.setLevel (Level.INFO); } catch (Exception expGeneral) { expGeneral.printStackTrace (); } } public static void main (String a[]) throws Exception { logger.info ("Start"); logger.warn ("Warning SOPs"); logger.info ("Information SOPs"); logger.debug ("Debug SOPs"); logger.info ("End"); } } Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9886152717 Extn: 40123 Pazhanikanthan Periasamy <[EMAIL PROTECTED]> 12/28/2005 09:44 AM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Vasumathi <[EMAIL PROTECTED]> Subject Re: Regarding Log4j I have written a sample program which yyou can use to start. Read teh documentation provided in Log4J package too for more information Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9886152717 Extn: 40123 Vasumathi <[EMAIL PROTECTED]> 12/28/2005 09:27 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding Log4j
I have written a sample program which yyou can use to start. Read teh documentation provided in Log4J package too for more information Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9886152717 Extn: 40123 Vasumathi <[EMAIL PROTECTED]> 12/28/2005 09:27 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]