Added debug log echo option to Calculation Engine (for PHPExcel development team debugging use only)

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@68482 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2011-02-11 22:45:17 +00:00
parent 5a7e7bb93f
commit 8a00ef61e8
1 changed files with 16 additions and 0 deletions

View File

@ -180,6 +180,19 @@ class PHPExcel_Calculation {
*/
public $writeDebugLog = false;
/**
* Flag to determine whether a debug log should be echoed by the calculation engine
* If true, then a debug log will be echoed
* If false, then a debug log will not be echoed
* A debug log can only be echoed if it is generated
*
* @access public
* @var boolean
*
*/
public $echoDebugLog = false;
/**
* An array of the nested cell references accessed by the calculation engine, used for the debug log
*
@ -3538,6 +3551,9 @@ class PHPExcel_Calculation {
private function _writeDebug($message) {
// Only write the debug log if logging is enabled
if ($this->writeDebugLog) {
if ($this->echoDebugLog) {
echo implode(' -> ',$this->debugLogStack).' -> '.$message,'<br />';
}
$this->debugLog[] = implode(' -> ',$this->debugLogStack).' -> '.$message;
}
} // function _writeDebug()