Skip to content

Commit

Permalink
Updating Debugger::log to get the source from the end of the stack
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8127 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
mariuswilms committed Mar 23, 2009
1 parent 14aaa16 commit 0a610d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cake/libs/debugger.php
Expand Up @@ -144,7 +144,8 @@ function log($var, $level = LOG_DEBUG) {

if (is_object($trace[0]['object']) && isset($trace[0]['object']->_reporter->_test_stack)) {
$stack = $trace[0]['object']->_reporter->_test_stack;
$source = "[". $stack[0].", ". $stack[2] ."::" . $stack[3] ."()]\n";
$source = sprintf('[%1$s, %3$s::%2$s()]' . "\n",
array_shift($stack), array_pop($stack), array_pop($stack));
}

CakeLog::write($level, $source . $_this->exportVar($var));
Expand Down

0 comments on commit 0a610d2

Please sign in to comment.