RE: [POLL] Logging
Howdy, Either call it log4j.properties and not logging.properties so that log4j can configure itself, or add a / to the getResourceAsStream argument. Your InputStream is null and the configureAndWatch call doesn't do anything because the props is empty. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Pitre, Russell [mailto:[EMAIL PROTECTED] >Sent: Friday, November 21, 2003 1:17 PM >To: Tomcat Users List >Subject: RE: [POLL] Logging > >Hi Everyone, thanx for helping me decide to which logging api to >usewhich is log4j...when i try to use the logger i get this >message on the console window... > >log4j:WARN No appenders could be found for logger >(com.pitre.servlet.SetupServlet). >log4j:WARN Please initialize the log4j system properly. > >I have the log4j jar file in my WEB-INF/lib directory and my >logging.properties file in the classes directory. I "configured" the >logger with the properties file as such...the logging.properties seems to >be loading fine..at least it can find the properties filemy >webapp is deployed by way of ant and a war file > >InputStream in = >getClass().getClassLoader().getResourceAsStream("logging.properties"); > props.load(in); > String watch = System.getProperty("LOGGING.WATCH"); > if(watch != null && watch.equalsIgnoreCase("TRUE")){ >PropertyConfigurator.configureAndWatch(watch); >System.out.println("Watch logging.properties every 60 seconds for >changes"); > }else{ >PropertyConfigurator.configure(props); >System.out.println("Not watching logging.properties for changes"); > } > >And here is my logging.properties file. > >log4j.rootLogger=debug, R >log4j.appender.R=org.apache.log4j.ConsoleAppender >log4j.appender.R.layout=org.apache.log4j.SimpleLayout > > >I'm baffled > >Russ > > > > >-Original Message- >From: Adam Hardy [mailto:[EMAIL PROTECTED] >Sent: Fri 11/21/2003 5:23 AM >To: Tomcat Users List >Cc: >Subject: Re: [POLL] Logging > > > > 2. Java.util.Logging > > Purely because it's part of the sdk and meets my logging >requirements. I > did use log4j before, but since I decided I should know > java.util.logging, I stuck with it after learning how to use it. > > Adam > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [POLL] Logging
Hi Everyone, thanx for helping me decide to which logging api to usewhich is log4j...when i try to use the logger i get this message on the console window... log4j:WARN No appenders could be found for logger (com.pitre.servlet.SetupServlet). log4j:WARN Please initialize the log4j system properly. I have the log4j jar file in my WEB-INF/lib directory and my logging.properties file in the classes directory. I "configured" the logger with the properties file as such...the logging.properties seems to be loading fine..at least it can find the properties filemy webapp is deployed by way of ant and a war file InputStream in = getClass().getClassLoader().getResourceAsStream("logging.properties"); props.load(in); String watch = System.getProperty("LOGGING.WATCH"); if(watch != null && watch.equalsIgnoreCase("TRUE")){ PropertyConfigurator.configureAndWatch(watch); System.out.println("Watch logging.properties every 60 seconds for changes"); }else{ PropertyConfigurator.configure(props); System.out.println("Not watching logging.properties for changes"); } And here is my logging.properties file. log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.ConsoleAppender log4j.appender.R.layout=org.apache.log4j.SimpleLayout I'm baffled Russ -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Fri 11/21/2003 5:23 AM To: Tomcat Users List Cc: Subject: Re: [POLL] Logging 2. Java.util.Logging Purely because it's part of the sdk and meets my logging requirements. I did use log4j before, but since I decided I should know java.util.logging, I stuck with it after learning how to use it. Adam - 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: [POLL] Logging
2. Java.util.Logging Purely because it's part of the sdk and meets my logging requirements. I did use log4j before, but since I decided I should know java.util.logging, I stuck with it after learning how to use it. Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [POLL] Logging
Log4J. Haven't tried anything else, since Log4J works and is very adaptable by just altering configuration (no code changes). - Tatu V. > -Original Message- > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker > Sent: 21. marraskuuta 2003 8:36 > To: [EMAIL PROTECTED] > Subject: Re: [POLL] Logging > > > Aside from a couple of throw-away apps (that I can't be bothered to config > :), it's Log4J all the way ;-). > > "Pitre, Russell" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > I need to use a robbust logging api for my webapp that I'm building, so > I decided I would cast a poll to get census of what everyone prefers > > > Logging, Which do you prefer? > > 1. Log4j > 2. Java.util.Logging > 3. Other > > > > Russ > > > > > - > 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: [POLL] Logging
Aside from a couple of throw-away apps (that I can't be bothered to config :), it's Log4J all the way ;-). "Pitre, Russell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I need to use a robbust logging api for my webapp that I'm building, so I decided I would cast a poll to get census of what everyone prefers Logging, Which do you prefer? 1. Log4j 2. Java.util.Logging 3. Other Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [POLL] Logging
Log4J - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, November 20, 2003 11:33 AM Subject: [POLL] Logging I need to use a robbust logging api for my webapp that I'm building, so I decided I would cast a poll to get census of what everyone prefers Logging, Which do you prefer? 1. Log4j 2. Java.util.Logging 3. Other Russ - 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: [POLL] Logging
We're using Log4j here under Weblogic for PeopleSoft. Very nice, although I must say we haven't tried anything else... Just starting to use Tomcat but, logging has not come up yet. Was glad to see mention on the list of the built in Tomcat logging ability which we may use for simple tasks and probably use Log4j for more complex logging requirements--dependent on the scope and complexity of the webapp I imagine. -Ryan > I need to use a robbust logging api for my webapp that I'm building, so > I decided I would cast a poll to get census of what everyone prefers > > > Logging, Which do you prefer? > > 1. Log4j > 2. Java.util.Logging > 3. Other > > > > Russ > > > - > 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: [POLL] Logging
Russ, Log4j, hands-down and easily, especially with log4j v1.3 domains and the awesome Chainsaw improvements. Nothing else comes close. Yoav Shapira Millennium ChemInformatics Absolutely agreed. Log4j works pretty much everywhere and I think it makes a *lot* more sense than the built-in Java logging. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [POLL] Logging
Howdy, Log4j, hands-down and easily, especially with log4j v1.3 domains and the awesome Chainsaw improvements. Nothing else comes close. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Pitre, Russell [mailto:[EMAIL PROTECTED] >Sent: Thursday, November 20, 2003 12:33 PM >To: Tomcat Users List >Subject: [POLL] Logging > >I need to use a robbust logging api for my webapp that I'm building, so >I decided I would cast a poll to get census of what everyone prefers > > >Logging, Which do you prefer? > >1. Log4j >2. Java.util.Logging >3. Other > > > >Russ > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[POLL] Logging
I need to use a robbust logging api for my webapp that I'm building, so I decided I would cast a poll to get census of what everyone prefers Logging, Which do you prefer? 1. Log4j 2. Java.util.Logging 3. Other Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]