Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Change Log Level
Change Log Level [message #846599] Mon, 16 April 2012 07:53 Go to next message
Michi Classen is currently offline Michi Classen
Messages: 36
Registered: March 2012
Member
Hi,

I would like to change the log level for client, aut agent and database.

I'm looking for an argument given on startup of jubula.

Thanks for your answer.

Michi
Re: Change Log Level [message #846653 is a reply to message #846599] Mon, 16 April 2012 14:21 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-Reitz
Messages: 32
Registered: November 2010
Member
I don't think it's possible to change the log level using command line arguments. The reason is because Jubula bundles initialize their logging based on a logback.xml file contained within the bundle. The code for this can be found in the various Activators for Jubula bundles. For example, ITE / testexec:

h ttp://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/tree/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/Activator.java#n67

(I apologize for the mangled link. I am still not yet permitted to post real, working links in this forum.)

One possible way to change the log level would be to extract the bundle contents and then modify the logback.xml file. You could also submit an enhancement request to make logging configurable from the command line.
Re: Change Log Level [message #847308 is a reply to message #846653] Tue, 17 April 2012 07:22 Go to previous messageGo to next message
Michi Classen is currently offline Michi Classen
Messages: 36
Registered: March 2012
Member
I need the log level to trace the submitted SQL statements. I want create a database schema for read only user, which have only the possibility to read and execute the tests. Therefor I want to grant the access rights on the tables to read only.

The problem is, hat the test execution needs write access on reporting, locking and some more tables. That means, I have to differ between the tables for definition and the tables for execution. And I have to find out, which tables are required for text execution with write access.

If I can log the SQL statements on test execution, then I would find out the tables.

Do you know, which logback.xml in which plug-in I have to set to trace level?
Re: Change Log Level [message #847345 is a reply to message #847308] Tue, 17 April 2012 08:06 Go to previous messageGo to next message
Achim Loerke is currently offline Achim Loerke
Messages: 335
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

You should be aware that the DB layout (except the tables used for reporting) is not part of any API and therefore will change without notice.

The team is currently looking into a major rewrite of the persistence layer. If this rewrite is chosen all of your work would be in vain.

That being said the logging configuration for clients is in the org.eclipse.jubula.client.core plug-in.


Re: Change Log Level [message #847363 is a reply to message #847345] Tue, 17 April 2012 08:24 Go to previous messageGo to next message
Zeb Ford-Reitz is currently offline Zeb Ford-Reitz
Messages: 32
Registered: November 2010
Member
I second Achim's comment that those tables are not API and may very well change in the near future, and you should consider very carefully whether to invest effort into this area. You could, for example, submit an enhancement request and work with the Jubula team to implement the functionality you're looking to achieve.

If you still are *sure* you want to log the SQL statements, I'm not sure that modifying the logback.xml file will be sufficient. You probably need to modify the persistence.xml file (in org.eclipse.jubula.client.core/META-INF directory) instead. h ttp://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging contains information and examples for logging in EclipseLink (the JPA provider that is used in Jubula). Sorry for the mangled link, I do not yet have enough posts to be allowed to enter working links in this forum.
Re: Change Log Level [message #847365 is a reply to message #847345] Tue, 17 April 2012 08:26 Go to previous messageGo to next message
Michi Classen is currently offline Michi Classen
Messages: 36
Registered: March 2012
Member
Changing the log level to trace in the org.eclipse.jubula.client.core plug-in logs everything but no SQL statements. I think, this is part of the persistence.xml file.


Re: Change Log Level [message #847391 is a reply to message #847365] Tue, 17 April 2012 08:55 Go to previous message
Michi Classen is currently offline Michi Classen
Messages: 36
Registered: March 2012
Member
You are right, it's not the best solution to reduce the rights on the database. The user can change values on client side which results into an exception, if the rights are limited to read only.

It needs a rights & role concept on gui level.
Previous Topic:Object mapping issue in libraries created in jubula
Next Topic:autrun under Linux
Goto Forum:
  


Current Time: Tue Sep 16 11:33:25 GMT 2014

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

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