Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo/Hibernate] Logging configuration not working
[Teneo/Hibernate] Logging configuration not working [message #666813] Fri, 22 April 2011 18:19 Go to next message
Mike Cooper is currently offline Mike CooperFriend
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

Re: [Teneo/Hibernate] Logging configuration not working [message #666814 is a reply to message #666813] Fri, 22 April 2011 18:20 Go to previous messageGo to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
I forgot to mention that I also set the system property -Dorg.apache.commons.logging.Log=org.apache.commons.logging. impl.Log4JLogger

-mike
Re: [Teneo/Hibernate] Logging configuration not working [message #666818 is a reply to message #666814] Fri, 22 April 2011 19:13 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mike,
A very obvious question (sorry to ask it..), but did you also try to set the log level to debug for Hibernate?

Are you running a rcp or in web server environment or something else?

gr. Martin

On 04/22/2011 08:20 PM, Mike wrote:
> I forgot to mention that I also set the system property -Dorg.apache.commons.logging.Log=org.apache.commons.logging.
> impl.Log4JLogger
>
> -mike
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo/Hibernate] Logging configuration not working [message #666819 is a reply to message #666818] Fri, 22 April 2011 20:01 Go to previous messageGo to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
Hi Martin,

Yes I've tried setting DEBUG for hibernate via

og4j.logger.org.hibernate=DEBUG

but it doesn't have any apparant affect.

The teneo/hibernate code is used by a standalone app and with glassfish. I'm doing all my debugging with the standalone app and that's the data I provided in my original post.

Best regards,
mike
Re: [Teneo/Hibernate] Logging configuration not working [message #666891 is a reply to message #666819] Sat, 23 April 2011 20:30 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mike,
I am afraid that I can't really help here (for the rcp side), I work with webapps mostly. Have you checked the .log file
in the workspace metadata (if you have that).
You don't see anything in glassfish either?

gr. Martin

On 04/22/2011 10:01 PM, Mike wrote:
> Hi Martin,
>
> Yes I've tried setting DEBUG for hibernate via
>
> og4j.logger.org.hibernate=DEBUG
>
> but it doesn't have any apparant affect.
>
> The teneo/hibernate code is used by a standalone app and with glassfish. I'm doing all my debugging with the standalone
> app and that's the data I provided in my original post.
>
> Best regards,
> mike
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo/Hibernate] Logging configuration not working [message #667910 is a reply to message #666891] Mon, 02 May 2011 18:19 Go to previous message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
Hi Martin,

Just back from vacation...

I looked at the .metadata/.log file and it doesn't seem to have anything relevant. No messages at all when I run my standalone app.

If I run the same classes via glassfish I don't see any differences really.

Is there someway of enabling debug messaging that might be embedded in teneo/hibernate for logging? Any suggestions on how to debug this would be most appreciated.

mike
Previous Topic:[EMF Compare] Detecting supertype changes for the purpose of creating a common Ecore model
Next Topic:How to extract all attribute names from my ecore metamodel
Goto Forum:
  


Current Time: Fri Apr 26 18:23:39 GMT 2024

Powered by FUDForum. Page generated in 0.03596 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top