Hi,

I think it is a good idea, but the avantage of logging inside code is to speficy special remark into log file dol_syslog(get_class($this).'/'.pathinfo(__FILE__,PATHINFO_FILENAME).'::'.__FUNCTION__.' HereIPutTextThatICanFindInLogEasy sql='.$sql);

Avantage to put it into SQL handler : all SQL query will be logged that is very good things. Disavantage, we do not know anymore what file/code part launch the request.

Regards

Florian Henry
+33 6 03 76 48 07
florian.he...@open-concept.pro
http://www.open-concept.pro
Twitter : @_Open_Concept_

Le 10/06/2014 13:59, Marcos García a écrit :
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 <mailto:marcos...@gmail.com>



_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

_______________________________________________
Dolibarr-dev mailing list
Dolibarr-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à