Browse Source

Fixed a bug about enabling trace with profiling.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
26b479179e
  1. 2
      framework/yii/log/Logger.php
  2. 2
      framework/yii/log/Target.php

2
framework/yii/log/Logger.php

@ -161,7 +161,7 @@ class Logger extends Component
public function log($message, $level, $category = 'application')
{
$time = microtime(true);
if (YII_DEBUG && YII_TRACE_LEVEL > 0) {
if (YII_DEBUG && YII_TRACE_LEVEL > 0 && !($level & self::LEVEL_PROFILE)) {
$traces = debug_backtrace();
$count = 0;
foreach ($traces as $trace) {

2
framework/yii/log/Target.php

@ -184,7 +184,7 @@ abstract class Target extends Component
* @param array $except the message categories to exclude. If empty, it means all categories are allowed.
* @return array the filtered messages.
*/
public function filterMessages($messages, $levels = 0, $categories = array(), $except = array())
public static function filterMessages($messages, $levels = 0, $categories = array(), $except = array())
{
foreach ($messages as $i => $message) {
if ($levels && !($levels & $message[1])) {

Loading…
Cancel
Save