[TYPO3-core] RFC #16200: New feature: add a control function for debugging
Franz Holzinger
franz at ttproducts.de
Mon Nov 1 13:05:52 CET 2010
This is an SVN patch request.
Type: New feature
Bugtracker references:
http://bugs.typo3.org/view.php?id=16200
Branches:
trunk
Problem:
Sometimes you wish to give control instructions to the debug/error
object. E.g. you wish to set other colors for the output. Or you want to
clear the output debug file and append the next output to the empty
file. Or you may want to change the debug output into an email or to the
Front End.
This would allow an easier debugging with less output. There exist
already some debug extensions. They all have their individual settings
in the EM. With this function the debug settings could be changed during
the execution of the extensions which are debugged.
Solution:
Add the function debugControl.
Notes:
The debug function itself is implemented in a TYPO3 extension.
Syntax:
function debugControl(array $parameters) {
$parameters is an array with the control type as the key. The type is
defined in the debug extension.
Test:
Add the method debugControl to a debug extension and make an error_log
to see that the parameter is passed correctly.
function debugControl(array $parameters) {
ob_start();
print_r($parameters);
$debugOut = ob_get_contents();
ob_end_clean();
error_log ('debugControl $parameters: '.$debugOut);
}
Insert the call in any PHP code which is executed:
debugControl(array('color' => 'yellow'));
- Franz
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debug_control.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101101/b845070f/attachment.txt>
More information about the TYPO3-team-core
mailing list