Re: Cayenne logging

2009-06-15 Thread Andrey Razumovsky
You certainly need not recompile anything and there's no need for logging.properties file, only log4j configuration. Just setup log4j as specified: http://tomcat.apache.org/tomcat-6.0-doc/logging.html 2009/6/13 Joe Baldwin > Andrey, > > Yes, it sounds like your suggestion is the next best option

Re: Cayenne logging

2009-06-13 Thread Aristedes Maniatis
On 14/6/09 12:58 AM, Joe Baldwin wrote: When Andrus said that he thought that log4j was an abandoned project, I became hesitant about relying on it as a stable component for the future.) I would certainly recommend log4j. It is easy to use and completely robust. It may not have been updated fo

Re: Cayenne logging

2009-06-13 Thread Joe Baldwin
Andrey, Yes, it sounds like your suggestion is the next best option to try.. (When Andrus said that he thought that log4j was an abandoned project, I became hesitant about relying on it as a stable component for the future.) I recall reading that the docs for Tomcat 6 say that it is not

Re: Cayenne logging

2009-06-12 Thread Andrey Razumovsky
Hi Joe! As far as I know, Juli is a weak logging system. For instance, I haven't found any rolling file appenders, so my logs grew endlessly. I will not be surprised if it doesn't support optional package loading. I reccomend you to switch to Log4j or something. Andrey 2009/6/12 Joe Baldwin >

Re: Cayenne logging

2009-06-12 Thread Joe Baldwin
Andrus, I did quite a few tests yesterday and still cannot determine whether the Tomcat logging.properties method will ever work. The directives that seem to work are as follows: handlers = org.apache.juli.FileHandler org.apache.juli.FileHandler.directory = ${catalina.base}/l

Re: Cayenne logging

2009-06-11 Thread Andrus Adamchik
On Jun 11, 2009, at 11:05 PM, Joe Baldwin wrote: Question: Is is possible that the Cayenne hard-coded defaults (which I read about somewhere in your docs), are over-riding my loggin.properties? Actually no. Cayenne (or your application code) would log something with a certain priority. A

Re: Cayenne logging

2009-06-11 Thread Joe Baldwin
en I do this, all of the Cayenne logs are redirected to the $ {catalina.base}/logs/mywebapp/mywebapp..log However, I still cannot control the cayenne logging. I have tried a number of property directives (including ".QueryLogger=OFF"), but the log still contains the "INFO"

Re: Cayenne logging

2009-06-11 Thread Michael Gentry
Hi Joe, I think you want an Application Listener. This is a class that implements javax.servlet.ServletContextListener which a servlet engine (such as Tomcat) is supposed to notify on application startup. For example: public class ApplicationListener implements ServletContextListener { ... public

Re: Cayenne logging

2009-06-11 Thread Andrus Adamchik
Don't remember in what context the .cayenne advice was given, but it is certainly not applicable here. In case of web application, there's many ways to catch the "startup" moment. Like within a servlet or filter init method, or a listener - check the javax.servlet package JavaDocs. Now, i

Re: Cayenne logging

2009-06-11 Thread Joe Baldwin
Andrus, Thanks for the apache logging link. Concerning: In short, when your application starts, and before Cayenne is loaded, you have to manually bootstrap log4j using PropertyConfigurator class, specifying the config file: PropertyConfigurator.configure(myFile); This way you can't pos

Re: Cayenne logging

2009-06-11 Thread Andrus Adamchik
I see, sorry for the confusion. As an aside Log4J *project* seems to be either dead or on life support, abandoned by its authors, who moved to write the new logging frameworks, which may or may not work with commons-logging. Still the latest stable version of Log4J works great. Just figured

Re: Cayenne logging

2009-06-11 Thread Joe Baldwin
Andrus, I have not used log4j very much and definitely am not an expert at configuring it. I have not been able to implement the instructions found at http://cayenne.apache.org/doc/configuring-logging.html so that I can control logging. Quoting from 3.0M6 docs on your website: "Co

Re: Cayenne logging

2009-06-11 Thread Andrus Adamchik
On Jun 11, 2009, at 5:32 PM, Joe Baldwin wrote: docs say that you can use either This can't be true... If you put org.objectstyle in the logging config, it will have zero effect in 2.0 and 3.0. Andrus

Re: Cayenne logging

2009-06-11 Thread Joe Baldwin
I am having the same problem. The docs say that you can use either but they do not going into sufficient detail (as a primer) so that I can control it. If anyone has be able to do this with 3.0M6, I would appreciate a simple example. Thanks, Joe On Jun 11, 2009, at 10:21 AM, Aristedes Ma

Re: Cayenne logging

2009-06-11 Thread Jason Ward
Yup. Great catch. Sorry about that. I was still looking at the 2.x user guide. Aristedes Maniatis wrote: On 12/6/09 12:13 AM, Jason Ward wrote: log4j.logger.org.objectstyle.cayenne = OFF log4j.logger.org.objectstyle.cayenne.access.QueryLogger = OFF log4j.logger.org.objectstyle.cayenne.conf =

Re: Cayenne logging

2009-06-11 Thread Aristedes Maniatis
On 12/6/09 12:13 AM, Jason Ward wrote: log4j.logger.org.objectstyle.cayenne = OFF log4j.logger.org.objectstyle.cayenne.access.QueryLogger = OFF log4j.logger.org.objectstyle.cayenne.conf = OFF log4j.logger.org.objectstyle.cayenne.util = OFF Note that the packaging changed from org.objectstyle t

Cayenne logging

2009-06-11 Thread Jason Ward
I realize this (basic) question has been asked a lot, but I'm still struggling to get logging disabled with Cayenne 3.0M6. I'm using log4j in my web-app and I'm starting tomcat with the log4j.configDebug=true flag so I can see that my properties file is loaded before my servlet inits. Despite