summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class5
1 files changed, 2 insertions, 3 deletions
diff --git a/it.class b/it.class
index f5d9f2b..e2e1dd0 100644
--- a/it.class
+++ b/it.class
@@ -208,6 +208,7 @@ static function error($p = array(), $extra = null)
list($p['graceperiod'], $p['timewindow']) = [$parts[0], $parts[1] - $parts[0]];
$p += array('blockmailid' => $GLOBALS['ULTRASITE'] . "." . md5($p['to']));
$traceline = it_debug::backtrace(['skiplevels' => $p['backtraceskip'] + ($p['trace'] ? 0 : 1), 'skipfiles' => $p['skipfiles'], 'trace' => $p['trace']]);
+ $mailid = sprintf("mail%04d", crc32($traceline ?: $p['title']) % 10000);
@mkdir("/tmp/alertdata");
@chmod("/tmp/alertdata", 0777);
@@ -273,8 +274,6 @@ static function error($p = array(), $extra = null)
$p['body'] = " See " . getenv('HOSTNAME') . ":$datafn";
}
- $mailid = sprintf("mail%04d", crc32($traceline ?: $p['title']) % 10000);
-
$body =
($p['omitdebuginfo'] >= 2 ? "" : ($url && !$toscreen? "Title: {$p['title']}\nUrl: $url\n" : "") .
($traceline ? ($sendmail ? "" : " ") . "Trace: $traceline\n" : "")) .
@@ -342,7 +341,7 @@ static function error($p = array(), $extra = null)
if ($_SERVER['REMOTE_ADDR']) # additional entry in log/error_log
error_log("it::error: " . $p['title'] . " Url: $url");
- it::log("alertlog", $p['title'] . " in " . ($traceline ? $traceline : "{$p['file']}:{$p['line']}") . " Url: $url" . ($p['body'] ? "\n" . substr(D($p['body']), 0, 5000) . "\n" : ""));
+ it::log("alertlog", $p['title'] . " ($mailid) in " . ($traceline ? $traceline : "{$p['file']}:{$p['line']}") . " Url: $url" . ($p['body'] ? "\n" . substr(D($p['body']), 0, 5000) . "\n" : ""));
return $p['fatal'] ? self::_exit($p) : null;
}