summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it.class b/it.class
index df6c0c0..6b5ef24 100644
--- a/it.class
+++ b/it.class
@@ -261,6 +261,8 @@ static function error($p = array())
($trace ? ($sendmail ? "" : " ") . "Trace: $trace\n" : "")) .
(!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . " at " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (invoked {$t}s before)" : "") . "\n") . # no it::date() due to time- debug param
self::$error_context .
+ ($p['id'] ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . " (previous err: " . it::date('', $errstamp) . ")\n" : "") .
+ ($origp['blockmail'] ? "Block-resend: " . $origp['blockmail'] . " seconds\n" : "") .
($p['body'] ? ($p['omitdebuginfo'] ? "" : "Body:\n") . trim($p['body'])."\n\n" : "");
if ($sendmail) # we're mailing: send maximum info
@@ -273,9 +275,7 @@ static function error($p = array())
if ($level >= $p['backtraceskip'] && $tracesize < 100000 && ($tracesize += strlen(print_r($stackframe, true))) < 100000) # save mem
$stackframes[] = $stackframe;
- $body .= $p['id'] ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . " (previous err: " . it::date('', $errstamp) . ")\n" : "";
- $body .= $origp['blockmail'] ? "Block-resend: " . $origp['blockmail'] . " seconds\n" : "";
- $body .= ($trace and $t = it::exec('grep -h {0} `ls /tmp/alertdata/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t\n" : "";
+ $body .= ($trace and $t = it::exec('grep -h {0} `ls /tmp/alertdata/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t" : "";
$body .= "\n";
$body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : "";
$body .= $_POST ? "\$_POST: " . var_export($_POST, true) . "\n\n" : "";