Dear IvyTeam How can I print sql query to log file when there are some get ivy task by query? I followed this link https://answers.axonivy.com/questions/1585/hibernate-show_sql but it seem for project that using hibernate? If I print query by method TaskQuery query.toString() I got some kind of query in log but it's not friendly with normal sql like below
Do you have any idea about it? How can I print sql? asked 27.07.2018 at 04:55 maidanh |
Hi Basically you can enable a logger that prints out all statements that are executed by Axon.ivy engine against the System Database. It will grow big, so I suggest that you put into an extra file: Open
Declare the appender as FileLog (copy the normal file logger and adjust):
The result will be a file under /logs/sql.log full sample:
answered 30.07.2018 at 06:53 Reguel Werme... ♦♦ It works like a charm, I'm very appreciate you
(31.07.2018 at 00:14)
maidanh
I have another question that. With this configuration we only can see sql query with question mark. How can we show (sql query + param value instead of question mark)?
(31.07.2018 at 23:35)
maidanh
Today it is not possible to see the values for SystemDB queries. The exception is the cryptic toString() functionality of the TaskQuery instance itself. External Database queries have a mature logging and performance measuring stack included which exposes the real SQL query that was fired.
(07.08.2018 at 07:48)
Reguel Werme... ♦♦
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 27.07.2018 at 04:55
Seen: 2,161 times
Last updated: 07.08.2018 at 07:48