[TYPO3-dev] mysql errors log

Franz Holzinger franz at ttproducts.de
Tue Jan 17 09:54:19 CET 2012


On 17/01/12 09:37, Vladimir Podkovanov wrote:
> On 17.01.2012 11:25, Franz Holzinger wrote:
>  > I always use the extension debug_mysql_db to show the SQL errors. This
>  > also shows the backtrace to the PHP files from where the SQL query has
>  > been called.

> Yep, I tried that extension, but was not able to log into file with PHP
> function error_log() - I tried example from doc but got an warning
> (wrong type of second argument). And looks like the ext logs all queries
> not only errors.

You must check
Textformat
[TEXTFORMAT]
     defines that the output is only in text format and not an array as 
for debug. Arrays are converted into normal text before the output 
function is called. Use this if you have set error_log as OUTPUT.

if you use error_log as OUTPUT.
If you use debug as OUTPUT, you could use any debug extension, E.g. use 
the extension fh_debug to write into a file in HTML format.

> Anyway I think logging SQL errors should be implemented in the core, not
> with xclassing.

You can set the Ticker
[TICKER]
     Minimum time in miliseconds for the duration of SQL queries which 
should be reported.
to a high value. Then only bigger queries and errors are reported.
Take care of the Comma-sep. list of tables to exclude
[EXCLUDETABLES]

- Franz




More information about the TYPO3-dev mailing list