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:[EMAIL PROTECTED]
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:[EMAIL PROTECTED]
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