diff options
author | Christian Schneider | 2007-09-21 15:27:13 +0000 |
---|---|---|
committer | Christian Schneider | 2007-09-21 15:27:13 +0000 |
commit | d7177f246e63afb2777eb8418cc4e5e3c17e9698 (patch) | |
tree | 9d2d09c6d2a2b8bf50e29d580ab1aba1e3d7be86 /it.class | |
parent | 622c7b7aa48ab4a4544fdc89af91bcff6c219c75 (diff) | |
download | itools-d7177f246e63afb2777eb8418cc4e5e3c17e9698.tar.gz itools-d7177f246e63afb2777eb8418cc4e5e3c17e9698.tar.bz2 itools-d7177f246e63afb2777eb8418cc4e5e3c17e9698.zip |
Streamline dumping of debug info
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -99,7 +99,7 @@ function error($p = array(), $body = "", $to = "") $p = array(); } - $p += array('timewindow' => 25*3600, 'graceperiod' => 60); + $p += array('timewindow' => 25*3600, 'graceperiod' => 60, 'backtraceskip' => 0); if (!$to) $to = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>',', ' '=>'')); @@ -134,12 +134,9 @@ function error($p = array(), $body = "", $to = "") $title="Error in $url"; if (!function_exists('memory_get_usage') || (memory_get_usage() < 50000000)) - { - $trace = "\n\nTrace: " . it_debug::backtrace(); - $stack = "\n\nStack:\n" . print_r(debug_backtrace(), true); - } + $trace = "\n\nTrace: " . it_debug::backtrace($p['backtraceskip']); - $body .= "\nUrl: $url$trace\n\n\$_REQUEST: ".print_r($_REQUEST, true) . "\n\$_SERVER: " . print_r($_SERVER, true) . $stack; + $body .= "\nUrl: $url$trace"; if (!ereg('live', $GLOBALS['ULTRASERVERTYPE'])) { @@ -152,6 +149,7 @@ function error($p = array(), $body = "", $to = "") EDC('exec', $cmd); if (($pipe = popen($cmd, "w"))) { + $body .= "\n\nLocals" . print_r($p['locals'], true) . "\n\n\$_REQUEST: ".print_r($_REQUEST, true) . "\n\$_SERVER: " . print_r($_SERVER, true) . "\n\nStack:\n" . print_r(debug_backtrace(), true); fputs($pipe, $body); pclose($pipe); } |