Added the debug file/line output directly into the AppModel::_pr function, as the builtin pr function simply logs the same file line for every call.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@437 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-30 23:32:10 +00:00
parent c0d26a8e95
commit b759f29d91

View File

@@ -71,6 +71,9 @@ class AppModel extends Model {
}
function _pr($level, $mixed, $checkpoint = null) {
if (Configure::read() <= 0)
return;
$log_level = $this->default_log_level;
$trace = debug_backtrace(false);
@@ -110,7 +113,12 @@ class AppModel extends Model {
$mixed = $chk + array($mixed);
}
pr(array("{$class}::{$function} (line {$line})" => $mixed));
echo '<DIV CLASS="pr-caller">';
echo '<strong>' . substr(str_replace(ROOT, '', $file), 1) . '</strong>';
echo ' (line <strong>' . $line . '</strong>)';
echo '</DIV>' . "\n";
pr(array("{$class}::{$function}()" => $mixed), false, false);
}
function pr($level, $mixed, $checkpoint = null) {