ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Logger.php
Go to the documentation of this file.
1 <?php
36 
44  private $_writeDebugLog = FALSE;
45 
54  private $_echoDebugLog = FALSE;
55 
61  private $_debugLog = array();
62 
68  private $_cellStack;
69 
70 
77  $this->_cellStack = $stack;
78  }
79 
85  public function setWriteDebugLog($pValue = FALSE) {
86  $this->_writeDebugLog = $pValue;
87  }
88 
94  public function getWriteDebugLog() {
95  return $this->_writeDebugLog;
96  }
97 
103  public function setEchoDebugLog($pValue = FALSE) {
104  $this->_echoDebugLog = $pValue;
105  }
106 
112  public function getEchoDebugLog() {
113  return $this->_echoDebugLog;
114  }
115 
119  public function writeDebugLog() {
120  // Only write the debug log if logging is enabled
121  if ($this->_writeDebugLog) {
122  $message = implode(func_get_args());
123  $cellReference = implode(' -> ', $this->_cellStack->showStack());
124  if ($this->_echoDebugLog) {
125  echo $cellReference,
126  ($this->_cellStack->count() > 0 ? ' => ' : ''),
127  $message,
128  PHP_EOL;
129  }
130  $this->_debugLog[] = $cellReference .
131  ($this->_cellStack->count() > 0 ? ' => ' : '') .
132  $message;
133  }
134  } // function _writeDebug()
135 
139  public function clearLog() {
140  $this->_debugLog = array();
141  } // function flushLogger()
142 
148  public function getLog() {
149  return $this->_debugLog;
150  } // function flushLogger()
151 
152 } // class PHPExcel_CalcEngine_Logger
153 
__construct(PHPExcel_CalcEngine_CyclicReferenceStack $stack)
Instantiate a Calculation engine logger.
Definition: Logger.php:76
getWriteDebugLog()
Return whether calculation engine logging is enabled or disabled.
Definition: Logger.php:94
writeDebugLog()
Write an entry to the calculation engine debug log.
Definition: Logger.php:119
getEchoDebugLog()
Return whether echoing of debug log information is enabled or disabled.
Definition: Logger.php:112
catch(Exception $e) $message
clearLog()
Clear the calculation engine debug log.
Definition: Logger.php:139
if($is_dev) echo "Review changes write something in WHATSNEW and and then commit with log PHP_EOL
setEchoDebugLog($pValue=FALSE)
Enable/Disable echoing of debug log information.
Definition: Logger.php:103
setWriteDebugLog($pValue=FALSE)
Enable/Disable Calculation engine logging.
Definition: Logger.php:85
Create styles array
The data for the language used.
getLog()
Return the calculation engine debug log.
Definition: Logger.php:148