17 $this->_logsEnabled =
true;
18 $this->_logsLevels = implode(
',', array(
21 CLogger::LEVEL_WARNING,
37 foreach ($this->data[
'messages'] as $log) {
39 if ($level == CLogger::LEVEL_ERROR) $errorCount++;
40 elseif ($level == CLogger::LEVEL_WARNING) $warningCount++;
41 elseif ($level == CLogger::LEVEL_INFO) $infoCount++;
43 return $this->
render(dirname(__FILE__) .
'/../views/panels/log_bar.php', array(
44 'count' => count($this->data[
'messages']),
45 'errorCount' => $errorCount,
46 'warningCount' => $warningCount,
47 'infoCount' => $infoCount,
54 foreach (
$data[
'messages'] as
$i => $log) {
55 list ($message, $level, $category, $time) = $log;
56 $time = date(
'H:i:s.', $time) . sprintf(
'%03d', (
int)(($time - (
int)$time) * 1000));
58 if (($lines = explode(
"\nStack trace:\n", $message, 2)) !==
false) {
60 if (isset($lines[1])) {
61 $traces = array_merge(
62 array(
'Stack trace:'),
63 explode(
"\n", $lines[1])
65 } elseif (($lines = explode(
"\nin ", $message)) !==
false) {
66 $message = array_shift($lines);
67 $base = dirname(Yii::app()->getBasePath()) . DIRECTORY_SEPARATOR;
68 foreach ($lines as &$line) {
69 $line = str_replace($base,
'', $line);
75 $data[
'messages'][
$i] = array($message, $level, $category, $time, $traces);
77 return $this->
render(dirname(__FILE__) .
'/../views/panels/log.php', array(