Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] how to supress Teneo-Output to console
[Teneo] how to supress Teneo-Output to console [message #496865] Wed, 11 November 2009 15:24 Go to next message
Thomas V is currently offline Thomas VFriend
Messages: 6
Registered: October 2009
Junior Member
Hi,
I created a simple RCP-application with an XTEXT-Editor(eclipse 3.5,org.eclipse.emf.teneo.hibernate(1.1.2),hibernate3) After a Sentence(Rule) is written, the application saves the ecore-objects with Teneo/Hibernate in a h2-database. This works fine.

But I have a problem with the Teneo-Output on the console(e.g. "INFO: Creating emf data store and registering........"). Every time Teneo/Hibernate saves the ecore-objects, a lot of INFO-Statements are printed out to console. To solve this, I created this log4j.properties-file:

log4j.rootLogger=info, A1
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=c:/Temp/hibernate_logging.log
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

log4j.logger.org.hibernate=info
log4j.logger.org.hibernate.hql.ast.AST=info
log4j.logger.org.hibernate.type=info
log4j.logger.org.hibernate.tool.hbm2ddl=info
log4j.logger.org.hibernate.SQL=info
log4j.logger.org.hibernate.hql=info
log4j.logger.org.hibernate.cache=info
log4j.logger.org.hibernate.transaction=info
log4j.logger.org.hibernate.jdbc=info

log4j.logger.org.eclipse.emf.teneo=info
log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=info
log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=info

The INFO-Statements from Hibernate are written to this file, but the Teneo-INFO-Statements still appear on the console.

What I'm doing wrong?

Thanks in advance.
Thomas
Re: [Teneo] how to supress Teneo-Output to console [message #496957 is a reply to message #496865] Wed, 11 November 2009 21:11 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Thomas,
This is annoying indeed. Possibly another log4j properties file is being used by the Teneo plugins (assuming some class
loading issue). When I run my testcases I don't see any Teneo info log statements, but I noticed on the build server
that there a lot of Teneo info statements are present in the output log.

You could try to pass the system parameter: -Dlog4j.debug=true then hopefully some more information is shown where which
log4j.properties file is read. But I am not sure how to do that when starting a rcp app.

Or you could just search for another log4j.properties file in the whole source/classpath tree of your app.

btw, support for Teneo is given on the EMF newsgroup which I added as a cc.

gr. Martin

Thomas V wrote:
> Hi, I created a simple RCP-application with an XTEXT-Editor(eclipse
> 3.5,org.eclipse.emf.teneo.hibernate(1.1.2),hibernate3) After a
> Sentence(Rule) is written, the application saves the ecore-objects with
> Teneo/Hibernate in a h2-database. This works fine.
>
> But I have a problem with the Teneo-Output on the console(e.g. "INFO:
> Creating emf data store and registering........"). Every time
> Teneo/Hibernate saves the ecore-objects, a lot of INFO-Statements are
> printed out to console. To solve this, I created this
> log4j.properties-file:
>
> log4j.rootLogger=info, A1
> log4j.appender.A1=org.apache.log4j.RollingFileAppender
> log4j.appender.A1.File=c:/Temp/hibernate_logging.log
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
> log4j.logger.org.hibernate=info
> log4j.logger.org.hibernate.hql.ast.AST=info
> log4j.logger.org.hibernate.type=info
> log4j.logger.org.hibernate.tool.hbm2ddl=info
> log4j.logger.org.hibernate.SQL=info
> log4j.logger.org.hibernate.hql=info
> log4j.logger.org.hibernate.cache=info
> log4j.logger.org.hibernate.transaction=info
> log4j.logger.org.hibernate.jdbc=info
>
> log4j.logger.org.eclipse.emf.teneo=info
> log4j.logger.org.eclipse.emf.teneo.hibernate.mapper.Generate HBM=info
> log4j.logger.org.eclipse.emf.teneo.hibernate.HbHelper=info
>
> The INFO-Statements from Hibernate are written to this file, but the
> Teneo-INFO-Statements still appear on the console.
>
> What I'm doing wrong?
>
> Thanks in advance.
> Thomas


--

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
Previous Topic:[Announce] EMFT Emf Index 0.8.0M3 is available
Next Topic:[Teneo] how to supress Teneo-Output to console
Goto Forum:
  


Current Time: Wed Jul 28 13:08:02 GMT 2021

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

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

Back to the top