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:
@@ -71,6 +71,9 @@ class AppModel extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _pr($level, $mixed, $checkpoint = null) {
|
function _pr($level, $mixed, $checkpoint = null) {
|
||||||
|
if (Configure::read() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
$log_level = $this->default_log_level;
|
$log_level = $this->default_log_level;
|
||||||
|
|
||||||
$trace = debug_backtrace(false);
|
$trace = debug_backtrace(false);
|
||||||
@@ -110,7 +113,12 @@ class AppModel extends Model {
|
|||||||
$mixed = $chk + array($mixed);
|
$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) {
|
function pr($level, $mixed, $checkpoint = null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user