On 6/10/2014 3:16 PM, dolibarr-dev-requ...@nongnu.org wrote:
Send Dolibarr-dev mailing list submissions to
dolibarr-dev@nongnu.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
or, via email, send a message with subject or body 'help' to
dolibarr-dev-requ...@nongnu.org
You can reach the person managing the list at
dolibarr-dev-ow...@nongnu.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Dolibarr-dev digest..."
Today's Topics:
1. Move SQL logging to database handler (Marcos Garc?a)
2. Re: Move SQL logging to database handler (Doursenaud)
3. Re: Move SQL logging to database handler (Florian HENRY)
4. Re: Move SQL logging to database handler (Doursenaud)
----------------------------------------------------------------------
Message: 1
Date: Tue, 10 Jun 2014 13:59:18 +0200
From: Marcos Garc?a <marcos...@gmail.com>
To: "Posts about Dolibarr ERP & CRM development and coding"
<dolibarr-dev@nongnu.org>
Subject: [Dolibarr-dev] Move SQL logging to database handler
Message-ID:
<CAA7cc7Hyeap4KC8-6PLvGKAqYCX48tK3ppeUPZSPZMT2z=u...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi all:
I found many dol_syslog calls from all over the code logging SQL to the
syslog module, so I found more appropiate to move them to the database
handler query function and decrease logging level to DEBUG (
https://github.com/Dolibarr/dolibarr/pull/1647/files).
The thing is that Francis Appels (https://github.com/fappels) warned me
that there are many more dol_syslog calls with format "class/file::function
sql=".$sql which are around of 800 calls.
I propose to change "class/file::function sql=".$sql to
"class/file::function". Because I find more appropiate to log SQL from the
SQL handler and no from all over the code.
Before going into that, what do you think about it?
Regards,
*Marcos Garc?a*
marcos...@gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.nongnu.org/archive/html/dolibarr-dev/attachments/20140610/9f0b244a/attachment.html>
------------------------------
Message: 2
Date: Tue, 10 Jun 2014 15:01:07 +0200
From: Doursenaud, Rapha?l <rdoursen...@gpcsolutions.fr>
To: "Posts about Dolibarr ERP & CRM development and coding"
<dolibarr-dev@nongnu.org>
Subject: Re: [Dolibarr-dev] Move SQL logging to database handler
Message-ID:
<CAML7jmctdSuvXJV0=udovfumrvs6ljnexfpwy944qspkjj8...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Factoring code is always a good idea, you have my vote !
2014-06-10 13:59 GMT+02:00 Marcos Garc?a <marcos...@gmail.com>:
Hi all:
I found many dol_syslog calls from all over the code logging SQL to the
syslog module, so I found more appropiate to move them to the database
handler query function and decrease logging level to DEBUG (
https://github.com/Dolibarr/dolibarr/pull/1647/files).
The thing is that Francis Appels (https://github.com/fappels) warned me
that there are many more dol_syslog calls with format "class/file::function
sql=".$sql which are around of 800 calls.
I propose to change "class/file::function sql=".$sql to
"class/file::function". Because I find more appropiate to log SQL from the
SQL handler and no from all over the code.
Before going into that, what do you think about it?
Regards,
*Marcos Garc?a*
marcos...@gmail.com
_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
Hi all,
As a beginning Dolibarr contributor I don't want to impose my remarks to
the expert contributors.
The reason why I commented on this Git PR, is that also module
developers like me use the query logs.
When developing modules I use the skeletons dev scripts to generate
classes, the generated scripts also contain query logging, so I suppose
other module developers will also have to refactor if they want to have
clean debug logging.
Another advantage of keeping the query logs in the top classes is that
the developer can decide to trace the query or not, example: avoid
having huge sql statements in your debug tracings.
By the way, I like the syslog tracing feature of Dolibarr, it saved me a
lot of debugging time.
Regards,
Francis Appels
_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev