Re: PropertyConfigurator.configureAndWatch
You are right. We should not have removed the api, and reviewing the api changes we have made is a task for the 1.3 beta. We should look at what is different and if we want to live with it, put it back, deprecated it, etc. I believe that, yes, configureAndWatch could be implemented with the FileWatchdog. It will probably have slightly different behavior (like not allowing multiple watchers from multiple calls to the method), but I think it would be better behavior. Or we could leave it. The big deal breaker was that there was not way to shutdown the watcher in the web server environment. This would be fixed with the new plugin stuff. -Mark - Original Message - From: "Scott Deboy" <[EMAIL PROTECTED]> To: "Log4J Users List" Cc: "Log4J Developers List" Sent: Wednesday, October 05, 2005 8:36 AM Subject: RE: PropertyConfigurator.configureAndWatch We can't remove the api without deprecating it 1st, so log4j 1.3 should support the configureandwatch methods. Is the plan to have domconfigurator.configureandwatch (and propertyconfigurator?) leverage a watchdog? I thought we had discussed this before but don't see it in the mailing list archive. Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Programmatically controlling log4j
On Wed, 05 Oct 2005 17:35:34 +0100, Rakesh Patel wrote: > How do I do the coding equivalent of: > > log4j.logger.org.springframework=OFF > log4j.logger.org.apache.log4j=OFF I found lots of good ideas in http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/ConfigurationServlet.java -- Mac :}) Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Programmatically controlling log4j
You probably don't want to turn them off but you may want to set their level to error or fatal. On 10/5/05, Rakesh Patel <[EMAIL PROTECTED]> wrote: > Hi, > > How do I do the coding equivalent of: > > log4j.logger.org.springframework=OFF > log4j.logger.org.apache.log4j=OFF > > Thanks > > Rakesh > > > American Express Investments and American Express Independent Financial > Advisers are marketing names for American Express Financial Services Europe > Limited, a separate corporation within the American Express group of > companies. American Express Financial Services Europe Limited is authorised > and regulated by, and is entered into the register (No. 190853 > www.fsa.gov.uk/register/) of, the Financial Services Authority and a member > of the London Stock Exchange. Registered in England No. 3614902. Registered > address: 230 Blackfriars Road, London SE1 8NW. Vat No. 740 4143 68. > > The information in this email and any attachments is confidential and > intended solely for the attention and use of the named addressee(s). It may > be subject to legal, professional or other privilege and further distribution > of it is strictly prohibited without our authority. If you are not the > intended recipient, you are not authorised to and must not disclose, copy, > distribute, or retain this message or any part of it, and should notify us > immediately. > > > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertyConfigurator.configureAndWatch
Yes, configureAndWatch has been removed in favor of the Watchdog mechanism. There should be a FileWatchdog as part of the 1.3 package. It has been generally tested, but probably needs more. Especially around configuring it from config files and what happens when the file actually updates. That whole mechanism is on my plate for the 1.3 review and push to beta. One thing of note with the Watchdogs is that they are no longer tied to a specific configurator class. The watchdog can support any Configurator and does not require any support or changes from the configurator (though we had to add one new method to the Configurator interface). -Mark On 10/5/05, Jacob Kjome <[EMAIL PROTECTED]> wrote: > > Quoting "Boddapati, Vijaya" <[EMAIL PROTECTED]>: > > > Hi, > > I have downloaded the latest version of log4j(1.3 alpha). But I could > > not locate the method configureAndWatch in PropertyConfigurator class. > > Please point me to the exact class. > > > > configureAndWatch() has been removed in Log4j-1.3. It is also not > recommended > to use this in Log4j-1.2 either if you are running in a J2EE environment. > > I believe Mark Womack was working on File Watchdogs and such, but I can't > quite > recall where he was with all that? Mark, can you comment? > > Jake > > > Thanks > > Vijaya > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Programmatically controlling log4j
Hi, How do I do the coding equivalent of: log4j.logger.org.springframework=OFF log4j.logger.org.apache.log4j=OFF Thanks Rakesh American Express Investments and American Express Independent Financial Advisers are marketing names for American Express Financial Services Europe Limited, a separate corporation within the American Express group of companies. American Express Financial Services Europe Limited is authorised and regulated by, and is entered into the register (No. 190853 www.fsa.gov.uk/register/) of, the Financial Services Authority and a member of the London Stock Exchange. Registered in England No. 3614902. Registered address: 230 Blackfriars Road, London SE1 8NW. Vat No. 740 4143 68. The information in this email and any attachments is confidential and intended solely for the attention and use of the named addressee(s). It may be subject to legal, professional or other privilege and further distribution of it is strictly prohibited without our authority. If you are not the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it, and should notify us immediately.
RE: PropertyConfigurator.configureAndWatch
Quoting Scott Deboy <[EMAIL PROTECTED]>: > We can't remove the api without deprecating it 1st, so log4j 1.3 should > support the configureandwatch methods. > I don't disagree, but this came with the fallout of the initial development path for Log4j-1.3 to be, acceptably, incompatible with Log4j-1.2.xx. There have been a number of changes since then making Log4j-1.3 closer to binary compatible with Log4j-1.2.xx. This is just one of those cases that hasn't yet been re-addressed. > Is the plan to have domconfigurator.configureandwatch (and > propertyconfigurator?) leverage a watchdog? I thought we had discussed > this before but don't see it in the mailing list archive. > You'll have to look further back in the archives. Mark was working on these things a long time ago, probably even for a later 1.2.xx release. I think development of them kind of stopped when Mark became less active. Now that he's more active again, I would think that they would see the light of day in Log4j-1.3. But I'll leave the last word on that to Mark. I'm making assumptions here. Jake > Scott > > > -Original Message- > From: Jacob Kjome [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 05, 2005 8:19 AM > To: Log4J Users List > Subject: Re: PropertyConfigurator.configureAndWatch > > Quoting "Boddapati, Vijaya" <[EMAIL PROTECTED]>: > > > Hi, > > I have downloaded the latest version of log4j(1.3 alpha). But I could > > > not locate the method configureAndWatch in PropertyConfigurator class. > > Please point me to the exact class. > > > > configureAndWatch() has been removed in Log4j-1.3. It is also not > recommended to use this in Log4j-1.2 either if you are running in a J2EE > environment. > > I believe Mark Womack was working on File Watchdogs and such, but I > can't quite recall where he was with all that? Mark, can you comment? > > Jake > > > Thanks > > Vijaya > > > > > - > 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: PropertyConfigurator.configureAndWatch
We can't remove the api without deprecating it 1st, so log4j 1.3 should support the configureandwatch methods. Is the plan to have domconfigurator.configureandwatch (and propertyconfigurator?) leverage a watchdog? I thought we had discussed this before but don't see it in the mailing list archive. Scott -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 8:19 AM To: Log4J Users List Subject: Re: PropertyConfigurator.configureAndWatch Quoting "Boddapati, Vijaya" <[EMAIL PROTECTED]>: > Hi, > I have downloaded the latest version of log4j(1.3 alpha). But I could > not locate the method configureAndWatch in PropertyConfigurator class. > Please point me to the exact class. > configureAndWatch() has been removed in Log4j-1.3. It is also not recommended to use this in Log4j-1.2 either if you are running in a J2EE environment. I believe Mark Womack was working on File Watchdogs and such, but I can't quite recall where he was with all that? Mark, can you comment? Jake > Thanks > Vijaya - 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: PropertyConfigurator.configureAndWatch
Quoting "Boddapati, Vijaya" <[EMAIL PROTECTED]>: > Hi, > I have downloaded the latest version of log4j(1.3 alpha). But I could > not locate the method configureAndWatch in PropertyConfigurator class. > Please point me to the exact class. > configureAndWatch() has been removed in Log4j-1.3. It is also not recommended to use this in Log4j-1.2 either if you are running in a J2EE environment. I believe Mark Womack was working on File Watchdogs and such, but I can't quite recall where he was with all that? Mark, can you comment? Jake > Thanks > Vijaya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to setup log4j for tomcat
Quoting John Cherouvim <[EMAIL PROTECTED]>: > Hello > > I'm pretty new with log4j so excuse me if my question is very basic. > > I have managed to setup log4j and call it from a class which I run > directly from Netbeans. I have configured log4j using a log4j.properties > in WEB-INF\classes\properties which is contained in the classpath in my Why WEB-INF/classes/properties? Are you performing your own manual configuration, because Log4j's auto-configuration won't find the file unless it is in the default package. Secondly, where is log4j.jar? If it isn't in WEB-INF/lib but a higher classloader such as CATALINA_HOME/common/lib, then Log4j has already attempted autoconfiguration at application startup and won't do it again when you deploy your webapp. Thirdly, if you have a log4j.xml file somewhere in your classpath such as CATALINA_HOME/common/classes or in some miscreant jar packaging its own log4j config file, then Log4j autoconfiguration will grab the log4j.xml file in preference to your own log4j.properties file (assuming that you are counting on autoconfiguration and not performing manual configuration upon application startup). I suggest looking into each of these issues to see if one of them is the problem. Jake > project > This one contains: > log4j.rootLogger=debug, stdout, R > 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.R=org.apache.log4j.RollingFileAppender > log4j.appender.R.File=example.log > log4j.appender.R.MaxFileSize=100KB > log4j.appender.R.layout=org.apache.log4j.PatternLayout > log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n > > Which works great. In my project's folder I can now see a file called > 'example.log' where I get all my logs. > > Now if I run my application from within tomcat no file is created and I > cannot find the logging that I did when the application run. > I also tried to do > log4j.appender.R.File=/usr/local/tomcat5/webapps/test-john-7/example.log > which is a direct path of the file on the server. > > What did miss? > Regards, > Ioannis > > - > 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]
PropertyConfigurator.configureAndWatch
Hi, I have downloaded the latest version of log4j(1.3 alpha). But I could not locate the method configureAndWatch in PropertyConfigurator class. Please point me to the exact class. Thanks Vijaya CONFIDENTIALITY NOTICE: This E-Mail is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message. Please notify the sender by E-Mail at the address shown. Thank you for your compliance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unable to setup log4j for tomcat
Add -Dlog4j.debug to your Tomcat parameters to see if log4j is finding your config file. (Look in std. out) On 10/5/05, John Cherouvim <[EMAIL PROTECTED]> wrote: > Hello > > I'm pretty new with log4j so excuse me if my question is very basic. > > I have managed to setup log4j and call it from a class which I run > directly from Netbeans. I have configured log4j using a log4j.properties > in WEB-INF\classes\properties which is contained in the classpath in my > project > This one contains: > log4j.rootLogger=debug, stdout, R > 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.R=org.apache.log4j.RollingFileAppender > log4j.appender.R.File=example.log > log4j.appender.R.MaxFileSize=100KB > log4j.appender.R.layout=org.apache.log4j.PatternLayout > log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n > > Which works great. In my project's folder I can now see a file called > 'example.log' where I get all my logs. > > Now if I run my application from within tomcat no file is created and I > cannot find the logging that I did when the application run. > I also tried to do > log4j.appender.R.File=/usr/local/tomcat5/webapps/test-john-7/example.log > which is a direct path of the file on the server. > > What did miss? > Regards, > Ioannis > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unable to setup log4j for tomcat
Hello I'm pretty new with log4j so excuse me if my question is very basic. I have managed to setup log4j and call it from a class which I run directly from Netbeans. I have configured log4j using a log4j.properties in WEB-INF\classes\properties which is contained in the classpath in my project This one contains: log4j.rootLogger=debug, stdout, R 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.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=example.log log4j.appender.R.MaxFileSize=100KB log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n Which works great. In my project's folder I can now see a file called 'example.log' where I get all my logs. Now if I run my application from within tomcat no file is created and I cannot find the logging that I did when the application run. I also tried to do log4j.appender.R.File=/usr/local/tomcat5/webapps/test-john-7/example.log which is a direct path of the file on the server. What did miss? Regards, Ioannis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]