Show SQL Statements in Log

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Show SQL Statements in Log

Koon Sang
Hello,

I would like to know how I can configure OFBIZ to show the SQL statements for all DB query in the log.  I tried starting OFBIZ in debug mode but no SQL statements are displayed.  Anyone can advise?

Thank you.


Reply | Threaded
Open this post in threaded view
|

Re: Show SQL Statements in Log

Scott Gray-2
If you're using derby then you can turn it on via derby.properties
Typically it is left to the database to do this type of logging simply because the bulk of them already support it in one form or another.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 1/09/2010, at 7:33 PM, Koon Sang wrote:

>
> Hello,
>
> I would like to know how I can configure OFBIZ to show the SQL statements
> for all DB query in the log.  I tried starting OFBIZ in debug mode but no
> SQL statements are displayed.  Anyone can advise?
>
> Thank you.
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Show-SQL-Statements-in-Log-tp2402732p2402732.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Show SQL Statements in Log

sakthi vadivel
Hi,

        I'm eager to see the queries generated by ofbiz, what if i use
different database than derby. I have checked mysql.properties that
doesn't has any specific properties to display the queries in log.

Please guide me to view all the queries from console or write it to
some log files.

with thanks and regards
sakthi

On Wed, Sep 1, 2010 at 1:07 PM, Scott Gray <[hidden email]> wrote:

> If you're using derby then you can turn it on via derby.properties
> Typically it is left to the database to do this type of logging simply because the bulk of them already support it in one form or another.
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 1/09/2010, at 7:33 PM, Koon Sang wrote:
>
>>
>> Hello,
>>
>> I would like to know how I can configure OFBIZ to show the SQL statements
>> for all DB query in the log.  I tried starting OFBIZ in debug mode but no
>> SQL statements are displayed.  Anyone can advise?
>>
>> Thank you.
>>
>>
>>
>> --
>> View this message in context: http://ofbiz.135035.n4.nabble.com/Show-SQL-Statements-in-Log-tp2402732p2402732.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>



--
sakthi
Reply | Threaded
Open this post in threaded view
|

Re: Show SQL Statements in Log

David E. Jones-2

Take a look at GenericDAO.java, line 755. There is code there to log the SQL if the query takes longer than 150ms to run. When I'm working on the Entity Engine I usually modify this to log all queries.

-David


On Sep 1, 2010, at 11:51 AM, sakthi vadivel wrote:

> Hi,
>
>        I'm eager to see the queries generated by ofbiz, what if i use
> different database than derby. I have checked mysql.properties that
> doesn't has any specific properties to display the queries in log.
>
> Please guide me to view all the queries from console or write it to
> some log files.
>
> with thanks and regards
> sakthi
>
> On Wed, Sep 1, 2010 at 1:07 PM, Scott Gray <[hidden email]> wrote:
>> If you're using derby then you can turn it on via derby.properties
>> Typically it is left to the database to do this type of logging simply because the bulk of them already support it in one form or another.
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 1/09/2010, at 7:33 PM, Koon Sang wrote:
>>
>>>
>>> Hello,
>>>
>>> I would like to know how I can configure OFBIZ to show the SQL statements
>>> for all DB query in the log.  I tried starting OFBIZ in debug mode but no
>>> SQL statements are displayed.  Anyone can advise?
>>>
>>> Thank you.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://ofbiz.135035.n4.nabble.com/Show-SQL-Statements-in-Log-tp2402732p2402732.html
>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> sakthi

Reply | Threaded
Open this post in threaded view
|

Re: Show SQL Statements in Log

sakthi vadivel
excellent, thank you for your information. I'll take it forward....

with regards and thanks
sakthi

On Wed, Sep 1, 2010 at 11:38 PM, David E Jones <[hidden email]> wrote:

>
> Take a look at GenericDAO.java, line 755. There is code there to log the SQL if the query takes longer than 150ms to run. When I'm working on the Entity Engine I usually modify this to log all queries.
>
> -David
>
>
> On Sep 1, 2010, at 11:51 AM, sakthi vadivel wrote:
>
>> Hi,
>>
>>        I'm eager to see the queries generated by ofbiz, what if i use
>> different database than derby. I have checked mysql.properties that
>> doesn't has any specific properties to display the queries in log.
>>
>> Please guide me to view all the queries from console or write it to
>> some log files.
>>
>> with thanks and regards
>> sakthi
>>
>> On Wed, Sep 1, 2010 at 1:07 PM, Scott Gray <[hidden email]> wrote:
>>> If you're using derby then you can turn it on via derby.properties
>>> Typically it is left to the database to do this type of logging simply because the bulk of them already support it in one form or another.
>>>
>>> Regards
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 1/09/2010, at 7:33 PM, Koon Sang wrote:
>>>
>>>>
>>>> Hello,
>>>>
>>>> I would like to know how I can configure OFBIZ to show the SQL statements
>>>> for all DB query in the log.  I tried starting OFBIZ in debug mode but no
>>>> SQL statements are displayed.  Anyone can advise?
>>>>
>>>> Thank you.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://ofbiz.135035.n4.nabble.com/Show-SQL-Statements-in-Log-tp2402732p2402732.html
>>>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> sakthi
>
>



--
sakthi