log-firebug.php 614 B

12345678910111213141516171819202122
  1. <script type="text/javascript">
  2. /*<![CDATA[*/
  3. if(typeof(console)=='object') {
  4. console.<?php echo $this->collapsedInFireBug?'groupCollapsed':'group'; ?>("Applicatie Logboek");
  5. <?php
  6. foreach($data as $index=>$log) {
  7. $time=date('H:i:s.',$log[3]).(int)(($log[3]-(int)$log[3])*1000);
  8. if($log[1]===CLogger::LEVEL_WARNING)
  9. $func='warn';
  10. elseif($log[1]===CLogger::LEVEL_ERROR)
  11. $func='error';
  12. else
  13. $func='log';
  14. $content=CJavaScript::quote("[$time][$log[1]][$log[2]] $log[0]");
  15. echo "\tconsole.{$func}(\"{$content}\");\n";
  16. }
  17. ?>
  18. console.groupEnd();
  19. }
  20. /*]]>*/
  21. </script>