Enable logging for SQL statements

952 views
Skip to first unread message

Torsten Geise

unread,
Jul 30, 2015, 5:02:10 AM7/30/15
to camunda BPM users
Dear all,

how can I see the SQL statements which are executed when using the Java API, e.g. when performing "historyService.createHistoricTaskInstanceQuery.list();"

Thanks,
Torsten

webcyberrob

unread,
Jul 30, 2015, 7:44:38 AM7/30/15
to camunda BPM users, torste...@googlemail.com
One thought which comes to mind is depending on your database, you may see them logged in the database itsself...

regards

Rob

Torsten Geise

unread,
Jul 30, 2015, 7:48:10 AM7/30/15
to camunda BPM users, iflyno...@hotmail.com
Hi Rob,

that's not what I'm looking for. Actually, I'm looking for something similar to the hibernate property "hibernate.show_sql" which I can set in the camunda.cfg.xml. 

I also tried setting the org.apache.ibatis log level to "FINE" which was not working.

Thanks,
Torsten

Ingo Richtsmeier

unread,
Aug 3, 2015, 4:59:43 AM8/3/15
to camunda BPM users
Hi Torsten,

in our process application archetype we prepared these metod calls in the JUnit-test class to show the database logging:

  static {
   
LogUtil.readJavaUtilLoggingConfigFromClasspath(); // process engine
   
LogFactory.useJdkLogging(); // MyBatis
 
}

Maybe you have to call the methods in your process application.

The log levels have to be configured in logging.properties:

org.apache.ibatis.level=FINE
org
.camunda.bpm.engine.impl.persistence.level=FINER

The second line shows the result set.

Hope this helps,

Ingo
Reply all
Reply to author
Forward
0 new messages