From 8a00ef61e872f0897c7bafa0846c415a7afbb012 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Fri, 11 Feb 2011 22:45:17 +0000 Subject: [PATCH] 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 --- Classes/PHPExcel/Calculation.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index 21ff92aa..7e839cd0 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -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,'
'; + } $this->debugLog[] = implode(' -> ',$this->debugLogStack).' -> '.$message; } } // function _writeDebug()