[TYPO3-core] RFC #9480: Bug/cleanup: Enhance debug information with SQL data

Steffen Kamper info at sk-typo3.de
Sat Oct 4 00:37:17 CEST 2008


Hi Francois,

+1 based on reading.

As this patch doesn't change functionality but helps to debug, which is only
developer orientated, i hope for 4.2 inclusion, i hope Ingo feels the same,
does he?  :-)

vg Steffen


"Francois Suter" <fsuter at cobweb.ch> schrieb im Newsbeitrag
news:mailman.1.1223065961.22812.typo3-team-core at lists.netfielders.de...
> Damn, forgot the patch...
>
> > This is an SVN patch request.
> >
> > Type: Bugfix / cleanup
> >
> > Bugtracker references:
> > http://bugs.typo3.org/view.php?id=9480
> >
> > Branches:
> > TYPO3_4-2 (if possible) and trunk
> >
> > Problem:
> > Method t3lib_db::debug_check_recordset() outputs a backtrace to the
> > syslog and the devlog in case where a SQL query failed. The output to
> > the devlog could be more useful if it also contained the SQL query that
> > caused the problem as well as the related SQL error.
> >
> > Solution:
> > Simply add this information to the extra arguments passed to
> > t3lib::devLog().
> >
> > Notes:
> > I hope this can go into 4.2 too, as I consider this to be more of a bug
> > than a new feature.
> >
> > Cheers
> >
>
>
>
> -- 
>
> Francois Suter
> Cobweb Development Sarl - http://www.cobweb.ch
>


----------------------------------------------------------------------------
----


> Index: t3lib/class.t3lib_db.php
> ===================================================================
> --- t3lib/class.t3lib_db.php (revision 4279)
> +++ t3lib/class.t3lib_db.php (working copy)
> @@ -1160,7 +1160,7 @@
>   }
>   $msg .= ': function t3lib_DB->' . $trace[0]['function'] . ' called from
file ' . substr($trace[0]['file'],strlen(PATH_site)+2) . ' in line ' .
$trace[0]['line'];
>   t3lib_div::sysLog($msg.'. Use a devLog extension to get more details.',
'Core/t3lib_db', 3);
> - t3lib_div::devLog($msg.'.', 'Core/t3lib_db', 3, $trace);
> + t3lib_div::devLog($msg.'.', 'Core/t3lib_db', 3, array('SQL Query' =>
$this->debug_lastBuiltQuery, 'SQL Error' => $this->sql_error(), 'Backtrace'
=> $trace));
>
>   return FALSE;
>   }
>




More information about the TYPO3-team-core mailing list