Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 15546 invoked from network); 11 Jun 2009 16:01:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jun 2009 16:01:46 -0000 Received: (qmail 66967 invoked by uid 500); 11 Jun 2009 16:01:54 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 66953 invoked by uid 500); 11 Jun 2009 16:01:54 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 66926 invoked by uid 99); 11 Jun 2009 16:01:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 16:01:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.86.89.68] (HELO elasmtp-masked.atl.sa.earthlink.net) (209.86.89.68) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jun 2009 16:01:45 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=o1Jpl/QfOnLH+vNsR+tXXOLQ9iQKOmJwEtEuf1Cb1CPrJJt32b4jE0yRafiYdf7k; h=Received:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [24.253.146.147] (helo=[10.0.1.2]) by elasmtp-masked.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from ) id 1MEmiS-0008FL-1g for user@cayenne.apache.org; Thu, 11 Jun 2009 12:01:24 -0400 Message-Id: <8C924D64-98E1-4751-A511-7A5F98249A50@earthlink.net> From: Joe Baldwin To: user@cayenne.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Cayenne logging Date: Thu, 11 Jun 2009 12:01:23 -0400 References: <6E39D30A-4C08-4D36-B91D-233F834B884B@objectstyle.org> <4A311112.5040905@gmail.com> <4A311301.7040805@maniatis.org> <5CF274C8-75BE-4C6C-BE01-AEAD1D041EEC@earthlink.net> X-Mailer: Apple Mail (2.935.3) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da9408dd325539f9ca9df01f443ccea4cf4a4350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.253.146.147 X-Virus-Checked: Checked by ClamAV on apache.org 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 possibly misplace the config file (you'll get an > exception), and all your logging configuration will be accounted for. I remember reading this in your docs. However, since the scenario is a Tomcat webapp, I am not exactly sure where it is in the code that the app "starts". I think that this was a topic in your discussion (that I read, possibly for an older version), and it suggested that the cayenne-log.properties should be placed in a hidden directory ".cayenne" in the search path (which, I assume for a WebApp is either WEB-INF/lib or WEB-INF/config/cayenne-files - if you use the web.xml filter). <= could not get either of these to work btw. I am in total hack-mode and am looking for the "ON/OFF" switch. :) Joe On Jun 11, 2009, at 11:40 AM, Andrus Adamchik wrote: > 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 > I'd mention.. > > This Log4J doc may get you started: > > http://logging.apache.org/log4j/1.2/manual.html > > 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 possibly misplace the config file (you'll get an > exception), and all your logging configuration will be accounted for. > > Andrus > > > On Jun 11, 2009, at 5:59 PM, Joe Baldwin wrote: >> 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: >> "Commons-logging allows users to choose their own logging >> provider, such as Log4J or java.util.logging." >> This is what I was attempting to convey in my last message (sorry, >> I was not trying to comment on 2.0 configuration) >> >> Furthermore, when I attempted to implement the example to turn SQL >> tracing off: >> log4j.logger.org.apache.cayenne.access.QueryLogger = WARN >> I found that there was no change in the output. >> >> So I can only assume that I am missing some fundamental part of the >> primer. My last theory is that I have either placed my cayenne- >> log.properties file in the wrong location, or I my configuration >> parameters are incomplete. >> >> Do you have any suggestions. >> >> Joe >> >> >> >> >> On Jun 11, 2009, at 10:37 AM, Andrus Adamchik wrote: >> >>> >>> 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 >>> >> >