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
Andrus, Well, I have been investigating the "logging.properties" strategy for the past couple of hours (aka hacking). I have been slightly successful. The Tomcat 6 docs (as best as I can decipher) recommend creating a file called "logging.properties". In this file in the WEB-INF/classes

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

Relationships refresh possible BUG

2009-06-11 Thread lmarc...@smausa.com
Hello all ! I have currently a big problem refreshing my relationships with cayenne 3.0M6 (tested with M5 too). I have a table JOB with some extended/dynamic properties and another related JOB_AUX table (kinda key/value pair table). So there is a to-many relationship between JOB->JOB_AUX wi

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

Re: Problems with Expression.match()

2009-06-11 Thread Andrus Adamchik
Here is one that I found: https://issues.apache.org/jira/browse/CAY-419 The description in the Jira is a bit vague, but the idea seems to be the same. Andrus On Jun 10, 2009, at 6:40 PM, Andrey Razumovsky wrote: #1. I can have a look. Please find JIRA or create a new one #2. You should c