1
0
www.mikescher.com/framework/views/lt/log-firebug.php

23 lines
588 B
PHP
Raw Permalink Normal View History

2014-05-13 12:40:42 +02:00
<script type="text/javascript">
/*<![CDATA[*/
if(typeof(console)=='object')
{
console.<?php echo $this->collapsedInFireBug?'groupCollapsed':'group'; ?>("Programos žurnalas");
<?php
foreach($data as $index=>$log)
{
$time=date('H:i:s.',$log[3]).sprintf('%03d',(int)(($log[3]-(int)$log[3])*1000));
if($log[1]===CLogger::LEVEL_WARNING)
$func='warn';
elseif($log[1]===CLogger::LEVEL_ERROR)
$func='error';
else
$func='log';
$content=CJavaScript::quote("[$time][$log[1]][$log[2]] $log[0]");
echo "\tconsole.{$func}(\"{$content}\");\n";
}
?>
console.groupEnd();
}
/*]]>*/
</script>