Exemple #1
0
 /**
  * Writes the output buffer in the log file
  * @return void
  */
 private function write_log()
 {
     if (!DOMPDF_LOG_OUTPUT_FILE || !is_writable(DOMPDF_LOG_OUTPUT_FILE)) {
         return;
     }
     $frames = Frame::$ID_COUNTER;
     $memory = DOMPDF_memory_usage();
     $memory = number_format($memory / 1024);
     $time = number_format((microtime(true) - $this->_start_time) * 1000, 2);
     $out = "<span style='color: #000'>{$frames} frames</span>\t" . "<span style='color: #900'>{$memory} KB</span>\t" . "<span style='color: #090'>{$time} ms</span>\t" . "<span style='color: #009' title='Quirksmode'>" . ($this->_quirksmode ? "<span style='color: #c00'>ON</span>" : "<span style='color: #0c0'>OFF</span>") . "</span><br />";
     $out .= ob_get_clean();
     file_put_contents(DOMPDF_LOG_OUTPUT_FILE, $out);
 }
Exemple #2
0
 /**
  * Writes the output buffer in the log file
  *
  * @return void
  */
 private function write_log()
 {
     $log_output_file = $this->get_option("log_output_file");
     if (!$log_output_file || !is_writable($log_output_file)) {
         return;
     }
     $frames = Frame::$ID_COUNTER;
     $memory = DOMPDF_memory_usage() / 1024;
     $time = (microtime(true) - $this->_start_time) * 1000;
     $out = sprintf("<span style='color: #000' title='Frames'>%6d</span>" . "<span style='color: #009' title='Memory'>%10.2f KB</span>" . "<span style='color: #900' title='Time'>%10.2f ms</span>" . "<span  title='Quirksmode'>  " . ($this->_quirksmode ? "<span style='color: #d00'> ON</span>" : "<span style='color: #0d0'>OFF</span>") . "</span><br />", $frames, $memory, $time);
     $out .= ob_get_clean();
     $log_output_file = $this->get_option("log_output_file");
     file_put_contents($log_output_file, $out);
 }
Exemple #3
0
 /**
  * Writes the output buffer in the log file
  * @return void
  */
 private function write_log()
 {
     if (!DOMPDF_LOG_OUTPUT_FILE || !is_writable(DOMPDF_LOG_OUTPUT_FILE)) {
         return;
     }
     $memory = DOMPDF_memory_usage();
     $memory = number_format($memory / 1024);
     $time = number_format((microtime(true) - $this->_start_time) * 1000, 4);
     $out = "<span style='color: #900'>{$memory} KB</span>    " . "<span style='color: #090'>{$time} ms</span><br />";
     $out .= ob_get_clean();
     file_put_contents(DOMPDF_LOG_OUTPUT_FILE, $out);
 }