diff options
author | Urban Müller | 2020-05-12 02:43:07 +0200 |
---|---|---|
committer | Urban Müller | 2020-05-12 02:43:07 +0200 |
commit | 1e1ccf69633070beaf638eeb6712962ad361a48a (patch) | |
tree | 1b92e083815cc8a577630713aa8fae2c8705813b | |
parent | c2a82199acca702cff6c4d1b359c1a4118c91b96 (diff) | |
download | itools-1e1ccf69633070beaf638eeb6712962ad361a48a.tar.gz itools-1e1ccf69633070beaf638eeb6712962ad361a48a.tar.bz2 itools-1e1ccf69633070beaf638eeb6712962ad361a48a.zip |
optionally add global extra info to all errs
-rw-r--r-- | it.class | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -21,6 +21,8 @@ class it { +static $error_context; # Text that will be added to all it_error mails + /** * Create config class with static members initialized (e.g. $home). * NOTE: PHP5 ONLY @@ -258,6 +260,7 @@ static function error($p = array()) ($trace ? ($sendmail ? "" : " ") . "Trace: $trace\n\n" : "")) . (!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . "\n\n") . (!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (invoked {$t}s before)" : "") . "\n\n") . # no it::date() due to time- debug param + self::$error_context . ($p['body'] ? ($p['omitdebuginfo'] ? "" : "Body:\n") . trim($p['body'])."\n\n" : ""); if ($sendmail) # we're mailing: send maximum info |