Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 83372 invoked from network); 5 Sep 2005 16:18:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2005 16:18:06 -0000 Received: (qmail 68882 invoked by uid 500); 5 Sep 2005 16:18:06 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 68869 invoked by uid 99); 5 Sep 2005 16:18:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 09:18:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of karan.malhi@gmail.com designates 64.233.170.200 as permitted sender) Received: from [64.233.170.200] (HELO rproxy.gmail.com) (64.233.170.200) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 09:18:18 -0700 Received: by rproxy.gmail.com with SMTP id i8so682590rne for ; Mon, 05 Sep 2005 09:18:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=G4bVTxsb01jZRb8ULQtdge4IlKG1LtU6rWPGK+0iTOUtmZ3lt9qjS0FSYyJaGM1Jz5JzxjL4iSOQW9R46oFeZDB7dHx5wtHMrKeIiDEfsi1hD3WCvG45Lza6F5X4SIud+krHDXBLAvO5qGZWTH+DluibXfiGAsTpkXF9sREV63E= Received: by 10.38.104.55 with SMTP id b55mr260255rnc; Mon, 05 Sep 2005 09:18:03 -0700 (PDT) Received: from ?192.168.0.2? ( [70.104.84.241]) by mx.gmail.com with ESMTP id 3sm4115022rnr.2005.09.05.09.18.01; Mon, 05 Sep 2005 09:18:03 -0700 (PDT) Message-ID: <431C6FA4.1050700@gmail.com> Date: Mon, 05 Sep 2005 12:17:40 -0400 From: karan malhi User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jdo-dev@db.apache.org Subject: Re: generated sql References: <431B77C7.5020508@gmail.com> <8531A6A4-53A2-4174-9A9F-6C9BAE20BA23@Sun.COM> <431B9AB0.8090308@gmail.com> <91AF323E-F5C1-40C3-8295-624CF1B873E2@Sun.COM> <431BC2FA.4060807@gmail.com> <431C682D.9050207@spree.de> In-Reply-To: <431C682D.9050207@spree.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Cool, It works. Thanks Michael Watzek wrote: > Hi Karan, > > thanks for supplying this patch. > > We are currently providing some logging documentation which we will > put onto the wiki. Below, you find some comments on TCK logging in > general. > > A TCK run involves several tools/components. Each of these components > use the same or different logging implementations: > > - Derby uses propriatary logging. > - JPOX uses Log4J. > - TCK/SpringFramwork uses Apache commons-logging. > - TCK/JUnit uses propriatary logging. > > Each of the involved logging implementations use different properties > files configuring logging. All of these files are located in "test/conf": > > - Derby uses "derby.properties". > - Log4J uses log4j.properties > - Apache commons-logging uses "common-logging.properties". > > The current logging configurations specify that log messages of all > components are written to files which are placed in subdirectories of > ".../target/logs". There, you have separate subdirectories for Derby > and the JPOX enhancer. The TCK as well as the JPOX runtime logging > output is placed in a special timestamp subdirectory. There, you find > several log files, two for each configuration. One file contains the > TCK log, the other contains the JPOX log. The naming patterns are > > - .txt > - -jpox.txt > > In your case, you like to have SQL statements in the JPOX logging > file. All you have to do is uncomment the following line in > "log4j.properties" (and replace the INFO log level by DEBUG): > > log4j.logger.JPOX.RDBMS=DEBUG, JPOX > > In particular, you do not need to change commons-logging.properties. > > Regards, > Michael > >> Hi Craig, >> >> Here is the patch for enabling log4j and also to see the sql >> generated by JPOX. I guess some string filters can be set on it to >> get rid of some of the messages (like execution time messages) >> >> Index: commons-logging.properties >> >> =================================================================== >> >> --- commons-logging.properties (revision 278625) >> >> +++ commons-logging.properties (working copy) >> >> @@ -28,7 +28,8 @@ >> >> # >> >> # Uncomment the next line if you want to use the apache simple logger >> -org.apache.commons.logging.Log = >> org.apache.commons.logging.impl.SimpleLog >> +#org.apache.commons.logging.Log = >> org.apache.commons.logging.impl.SimpleLog >> >> # Uncomment the next two lines if you want to use JDK 1.4 logging >> #org.apache.commons.logging.Log = org.apache.jdo.tck.util.JDOJdk14Logger >> +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger >> >> Index: log4j.properties >> >> =================================================================== >> >> --- log4j.properties (revision 278625) >> >> +++ log4j.properties (working copy) >> >> @@ -18,23 +18,28 @@ >> >> ########################### >> >> # JPOX appenders >> -log4j.appender.JPOX=org.apache.jdo.tck.util.TCKFileAppender >> -log4j.appender.JPOX.File=jpox.txt >> +#log4j.appender.JPOX=org.apache.jdo.tck.util.TCKFileAppender >> +#log4j.appender.JPOX.File=jpox.txt >> +log4j.appender.JPOX=org.apache.log4j.ConsoleAppender >> log4j.appender.JPOX.layout=org.apache.log4j.PatternLayout >> log4j.appender.JPOX.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) >> %-5p [%c] - %m%n >> >> # JPOX loggers >> -log4j.logger.JPOX=INFO, JPOX >> +log4j.logger.JPOX=ERROR, JPOX >> +log4j.logger.JPOX.RDBMS.SQL=DEBUG, JPOX >> +log4j.logger.org.springframework.beans.factory.xml.XmlBeanDefinitionReader=INFO, >> JPOX >> +log4j.additivity.JPOX=false >> +log4j.additivity.JPOX.RDBMS.SQL=false >> +#log4j.addivity.org.springframework.beans.factory.xml.XmlBeanDefinitionReader=false >> >> #log4j.logger.JPOX.JDO=INFO, JPOX >> #log4j.logger.JPOX.Cache=INFO, JPOX >> #log4j.logger.JPOX.MetaData=INFO, JPOX >> #log4j.logger.JPOX.General=DEBUG, JPOX >> #log4j.logger.JPOX.Utility=INFO, JPOX >> #log4j.logger.JPOX.Transaction=INFO, JPOX >> -#log4j.logger.JPOX.RDBMS=INFO, JPOX >> +#log4j.appender.JPOX.RDBMS=org.apache.log4j.ConsoleAppender >> +#log4j.logger.JPOX.Enhancer=INFO, JPOX >> +#log4j.logger.JPOX.SchemaTool=INFO, JPOX >> >> -log4j.logger.JPOX.Enhancer=INFO, JPOX >> -log4j.logger.JPOX.SchemaTool=INFO, JPOX >> - >> # C3P0 loggers >> log4j.logger.com.mchange.v2=INFO, JPOX >> >> >> Craig Russell wrote: >> >>> Hi Karan, >>> >>> The log4j property file is found at tck20/test/conf/log4j.properties. >>> >>> Let us know once you get the right properties, and we can update the >>> "how to run the tck" page. >>> >>> Craig >>> >>> On Sep 4, 2005, at 6:09 PM, karan malhi wrote: >>> >>>> These properties can be found on the following url : >>>> http://www.jpox.org/docs/1_1/logging.html >>>> According to the jpox website, we have to set these properties in >>>> the log4j.properties file. There is one property which i found >>>> "JPOX.RDBMS.SQL" , which would display the generated sql. But, i >>>> dont know how to integrate this with the SimpleLog we are using in >>>> maven. >>>> >>>> >>>> Craig Russell wrote: >>>> >>>> >>>>> Hi Karan, >>>>> >>>>> The recent changes to the logging result in the jpox log being >>>>> created in the same directory as the test output files. You can >>>>> configure the logging by using jpox-specific properties in the >>>>> tck20/test/conf/jdori.properties configuration file. >>>>> >>>>> I don't know the exact property to use, though. >>>>> >>>>> Can JPOX experts share these properties? And perhaps update the >>>>> jdori.properties with the values and a clue as to how to do this? >>>>> >>>>> Craig >>>>> >>>>> On Sep 4, 2005, at 3:40 PM, karan malhi wrote: >>>>> >>>>> >>>>>> Can i somehow view (in the log) the sql which jpox generates? >>>>>> >>>>>> -- >>>>>> Karan Singh >>>>>> >>>>>> >>>>>> >>>>> >>>>> Craig Russell >>>>> >>>>> Architect, Sun Java Enterprise System >>>>> http://java.sun.com/products/jdo >>>>> >>>>> 408 276-5638 mailto:Craig.Russell@sun.com >>>>> >>>>> P.S. A good JDO? O, Gasp! >>>>> >>>>> >>>>> >>>> >>>> -- >>>> Karan Singh >>>> >>>> >>> >>> Craig Russell >>> >>> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo >>> >>> 408 276-5638 mailto:Craig.Russell@sun.com >>> >>> P.S. A good JDO? O, Gasp! >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> Index: commons-logging.properties >> =================================================================== >> --- commons-logging.properties (revision 278625) >> +++ commons-logging.properties (working copy) >> @@ -28,7 +28,8 @@ >> # >> >> # Uncomment the next line if you want to use the apache simple logger >> -org.apache.commons.logging.Log = >> org.apache.commons.logging.impl.SimpleLog >> +#org.apache.commons.logging.Log = >> org.apache.commons.logging.impl.SimpleLog >> >> # Uncomment the next two lines if you want to use JDK 1.4 logging >> #org.apache.commons.logging.Log = >> org.apache.jdo.tck.util.JDOJdk14Logger >> +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger >> >> Index: log4j.properties >> =================================================================== >> --- log4j.properties (revision 278625) >> +++ log4j.properties (working copy) >> @@ -18,23 +18,28 @@ >> ########################### >> >> # JPOX appenders >> -log4j.appender.JPOX=org.apache.jdo.tck.util.TCKFileAppender >> -log4j.appender.JPOX.File=jpox.txt >> +#log4j.appender.JPOX=org.apache.jdo.tck.util.TCKFileAppender >> +#log4j.appender.JPOX.File=jpox.txt >> +log4j.appender.JPOX=org.apache.log4j.ConsoleAppender >> log4j.appender.JPOX.layout=org.apache.log4j.PatternLayout >> log4j.appender.JPOX.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) >> %-5p [%c] - %m%n >> >> # JPOX loggers >> -log4j.logger.JPOX=INFO, JPOX >> +log4j.logger.JPOX=ERROR, JPOX >> +log4j.logger.JPOX.RDBMS.SQL=DEBUG, JPOX >> +log4j.logger.org.springframework.beans.factory.xml.XmlBeanDefinitionReader=INFO, >> JPOX >> +log4j.additivity.JPOX=false >> +log4j.additivity.JPOX.RDBMS.SQL=false >> +#log4j.addivity.org.springframework.beans.factory.xml.XmlBeanDefinitionReader=false >> >> #log4j.logger.JPOX.JDO=INFO, JPOX >> #log4j.logger.JPOX.Cache=INFO, JPOX >> #log4j.logger.JPOX.MetaData=INFO, JPOX >> #log4j.logger.JPOX.General=DEBUG, JPOX >> #log4j.logger.JPOX.Utility=INFO, JPOX >> #log4j.logger.JPOX.Transaction=INFO, JPOX >> -#log4j.logger.JPOX.RDBMS=INFO, JPOX >> +#log4j.appender.JPOX.RDBMS=org.apache.log4j.ConsoleAppender >> +#log4j.logger.JPOX.Enhancer=INFO, JPOX >> +#log4j.logger.JPOX.SchemaTool=INFO, JPOX >> >> -log4j.logger.JPOX.Enhancer=INFO, JPOX >> -log4j.logger.JPOX.SchemaTool=INFO, JPOX >> - >> # C3P0 loggers >> log4j.logger.com.mchange.v2=INFO, JPOX > > > -- Karan Singh