diff options
author | Urban Müller | 2024-04-03 15:42:16 +0200 |
---|---|---|
committer | Urban Müller | 2024-04-03 15:42:16 +0200 |
commit | 2e1c213dd0804d6820bb8ba7705a598630032d9f (patch) | |
tree | 66cd3b78e169fa043d20af09fa158f35f9822272 | |
parent | 3eba0fd72e667b4c2f3362c7cd4db4e989af56eb (diff) | |
download | itools-2e1c213dd0804d6820bb8ba7705a598630032d9f.tar.gz itools-2e1c213dd0804d6820bb8ba7705a598630032d9f.tar.bz2 itools-2e1c213dd0804d6820bb8ba7705a598630032d9f.zip |
indicate logfile for further errors
-rw-r--r-- | it.class | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -273,11 +273,13 @@ static function error($p = array(), $extra = null) @file_put_contents($datafn = "$home/tmp/error-" . substr(md5($p['body']), 0, 2), $p['body']); # NOPHPLINT $p['body'] = " See " . getenv('HOSTNAME') . ":$datafn"; } + $service = it::match('[^.]*', $GLOBALS['ULTRASITE']); $body = ($p['omitdebuginfo'] >= 2 ? "" : ($url && !$toscreen? "Title: {$p['title']}\nUrl: $url\n" : "") . ($traceline ? ($sendmail ? "" : " ") . "Trace: $traceline\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)" : "") . " id $mailid\n") . # no it::date() due to time- debug param + ($sendmail && it::is_live() ? "Log: see $service/log/alertlog $mailid" : "") . ($sendmail ? $p['head'] : "") . ($p['id'] && !$toscreen ? "Filter: timewindow=" . $p['graceperiod'] . "-" . ($p['graceperiod'] + $p['timewindow']) . " (previous err: " . it::date('', $errstamp) . ")\n" : "") . (!$origp['blockmail'] || $p['omitdebuginfo'] || $toscreen ? "" : "Block-resend: " . $origp['blockmail'] . " seconds\n") . @@ -285,7 +287,7 @@ static function error($p = array(), $extra = null) if ($sendmail || EDC('verboseerrors')) # we're mailing: send maximum info { - $p['title'] = it::replace(['alert:|server:|^: "' => "", '(pw|passw|password\d*|secret)(=)[^&\s]*' => '$1$2*****'], it::match('[^.]*', $GLOBALS['ULTRASITE']) . ": " . $p['title']) . " (via " . getenv('HOSTNAME') . ")"; + $p['title'] = it::replace(['alert:|server:|^: "' => "", '(pw|passw|password\d*|secret)(=)[^&\s]*' => '$1$2*****'], "$service: " . $p['title']) . " (via " . getenv('HOSTNAME') . ")"; if (!$p['omitdebuginfo']) { |