You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2015/03/18 19:37:38 UTC
LogSqlPackages
Hi guys
I added today LogSqlPackages config to datasource properties.
It works in combination with LogSql.
As a reminder LogSql will dump in the console sql queries done on the
datasource.
LogSqlPackages will add on the log line a light stacktrace (only element
matching the packages set).
Here a sample:
<Resource id="ds" type="DataSource">
LogSql = true
LogSqlPackages = com.foo.supercompany,com.bar.anothersupercompany
</Resource>
It will log something like
INFOS - select * from Foo f where f.id = 1234 - stack: ->
com.foo.supercompany.beans.SuperService ->
com.bar.anothersupercompany.other.OtherService
-> com.bar.anothersupercompany.other.OtherServiceAgain
That's quite useful to identify where deadlocks come from when you dont
control much the deployment environment (and the db in particular)
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
Re: LogSqlPackages
Posted by Daniel Cunha <da...@gmail.com>.
+1
On Wed, Mar 18, 2015 at 3:37 PM, Romain Manni-Bucau
<rm...@gmail.com> wrote:
> Hi guys
>
> I added today LogSqlPackages config to datasource properties.
>
> It works in combination with LogSql.
>
> As a reminder LogSql will dump in the console sql queries done on the
> datasource.
>
> LogSqlPackages will add on the log line a light stacktrace (only element
> matching the packages set).
>
> Here a sample:
>
> <Resource id="ds" type="DataSource">
> LogSql = true
> LogSqlPackages = com.foo.supercompany,com.bar.anothersupercompany
> </Resource>
>
> It will log something like
>
> INFOS - select * from Foo f where f.id = 1234 - stack: ->
> com.foo.supercompany.beans.SuperService ->
> com.bar.anothersupercompany.other.OtherService
> -> com.bar.anothersupercompany.other.OtherServiceAgain
>
> That's quite useful to identify where deadlocks come from when you dont
> control much the deployment environment (and the db in particular)
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> | Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
--
Best regard,
Daniel Cunha (soro)