dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] Move SQL logging to database handler


From: Francis.appels
Subject: Re: [Dolibarr-dev] Move SQL logging to database handler
Date: Mon, 16 Jun 2014 14:28:17 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 6/10/2014 3:16 PM, address@hidden wrote:
Send Dolibarr-dev mailing list submissions to
        address@hidden

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
        address@hidden

You can reach the person managing the list at
        address@hidden

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 <address@hidden>
To: "Posts about Dolibarr ERP & CRM development and coding"
        <address@hidden>
Subject: [Dolibarr-dev] Move SQL logging to database handler
Message-ID:
        <address@hidden>
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*

address@hidden
-------------- 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 <address@hidden>
To: "Posts about Dolibarr ERP & CRM development and coding"
        <address@hidden>
Subject: Re: [Dolibarr-dev] Move SQL logging to database handler
Message-ID:
        <address@hidden>
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 <address@hidden>:

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*

address@hidden


_______________________________________________
Dolibarr-dev mailing list
address@hidden
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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]