diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -194,6 +194,13 @@ function error($p = array(), $body = null, $to = null) # $body and $to deprecate if ($toscreen || $sendmail) { $trace = it_debug::backtrace($p['backtraceskip']); # moved in here for performance in mass error case + + if (strlen($p['body']) > 500000) + { + file_put_contents($datafn = "/tmp/alertdata/error-" . substr(md5($p['body']), 0, 2), $p['body']); + $p['body'] = "Body: " . getenv('HOSTNAME') . ":$datafn"; + } + $body = ($p['body'] ? trim($p['body'])."\n\n" : "") . ($url && !$toscreen? "{$p['title']}\n\nUrl: $url\n\n" : "") . ($trace ? ($sendmail?"" :" ")."Trace: $trace\n\n" : ""); if ($sendmail) # we're mailing: send maximum info |