[Teneo/Hibernate] Logging configuration not working [message #666813] |
Fri, 22 April 2011 18:19 |
Mike Cooper Messages: 60 Registered: February 2011 |
Member |
|
|
Hi Folks,
I'm having a hard time getting control of teneo/hibernate logging. No matter what I try I get this output from my application when I invoke Teno/Hibernate classes:
Apr 22, 2011 11:10:11 AM org.eclipse.emf.teneo.hibernate.HbHelper createRegisterDataStore
INFO: Creating emf data store and registering it under name: vortex
Apr 22, 2011 11:10:11 AM org.eclipse.emf.teneo.hibernate.HbHelper createRegisterDataStore
INFO: Returning created emf data store, initialize this newly created data store!
Apr 22, 2011 11:10:11 AM org.eclipse.emf.teneo.classloader.ClassLoaderResolver setClassLoaderStrategy
INFO: Class loader strategy set to: org.eclipse.emf.teneo.classloader.ContextClassLoaderStrategy
2011-04-22 11:10:11,487 DEBUG [vortex.db.PersistManager] dbInit: Initializing DataStore
Apr 22, 2011 11:10:11 AM org.hibernate.annotations.common.Version <clinit>
INFO: Hibernate Commons Annotations 3.2.0.Final
Apr 22, 2011 11:10:11 AM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.6.1.Final
Apr 22, 2011 11:10:11 AM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Apr 22, 2011 11:10:11 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : javassist
Apr 22, 2011 11:10:11 AM org.hibernate.cfg.Environment <clinit>
....truncated....
My goal is to only see ERROR messages in this particular case.
I have a log4j.properties file in the first directory in classpath.
I also have tried log4j's PropertyConfigurator.configure() to specify the full path to log4j.properties. I've set log4j.debug=true and see it's loading log4j.properties. This works for my app itself which uses log4j, but none of the teneo output ever changes.
I know teneo/hibernate uses commons-logging but I don't see how to get it to output any debugging messages about what it's doing. I've spent many hours googling and haven't found anything that works.
Here is log4j.properties
# Set root logger level to WARN and its only appender to A1.
log4j.rootLogger=ERROR, A1
#log4j.rootLogger=DEBUG, A1
# Enable DEBUG only for our own
log4j.logger.vortex=DEBUG
#log4j.logger.vortex=A1
# This probably won't work
log4j.logger.org.quartz=DEBUG
# This is for c3po used by Quartz [ Confirmed to use log4j ]
log4j.logger.com.mchange=WARN
# Force WARN only for Eclipse
log4j.logger.org.eclipse=WARN
# Force WARN only for Hibernate
log4j.logger.org.hibernate=ERROR
log4j.logger.org.hibernate.type=ERROR
#log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.eclipse.emf=ERROR
#log4j.logger.org.eclipse.emf.teneo.hibernate.HbDataStore=ERROR
#log4j.logger.org.springframework=debug
#log4j.logger.org.hibernate.hql.ast.AST=info
#log4j.logger.org.hibernate.SQL=trace
#log4j.logger.org.hibernate.type= trace
#log4j.logger.org.hibernate.tool.hbm2ddl=warn
#log4j.logger.org.hibernate.hql=debug
#log4j.logger.org.hibernate.cache=info
#log4j.logger.org.hibernate.jdbc=debug
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
#log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.appender.A1.layout.ConversionPattern=%d %-5p [%c] %m%n
In my class path I have
log4j-1.2.16.jar
jcl-over-slf4j-1.5.8.jar
jul-to-slf4j-1.5.8.jar
slf4j-api-1.5.8.jar
slf4j-log4j12-1.5.8.jar
commons-logging-1.1.1.jar
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03596 seconds