summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2018-04-11 14:21:00 +0200
committerUrban Müller2018-04-11 14:21:00 +0200
commit1bf1f64969a6270d655e8819258e574b4dcb33e0 (patch)
tree1a66efa3b28c6bbeeecfe4b786bc1c35114eec94
parent02cb32f0f1c216e5c3f7ed1a0038c1ae8a83f0a5 (diff)
downloaditools-1bf1f64969a6270d655e8819258e574b4dcb33e0.tar.gz
itools-1bf1f64969a6270d655e8819258e574b4dcb33e0.tar.bz2
itools-1bf1f64969a6270d655e8819258e574b4dcb33e0.zip
respect omitdebuginfo
-rw-r--r--it.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it.class b/it.class
index 2715438..07822a6 100644
--- a/it.class
+++ b/it.class
@@ -135,7 +135,7 @@ static function timerlog($label = '')
* @param $p['skipfiles'] files to skip in backtrace
* @param $p['okstate'] give current ok label and ok state, e.g. telresult=1 for working. see failcount
* @param $p['failcount'] give number of consecutive okstate failures needed for creating an error [2]
- * @param $p['omitdebuginfo'] value 1 omits long stack and var dumps, value 2 also omits trace and url
+ * @param $p['omitdebuginfo'] value 1 omits long stack and var dumps, value 2 also minimal infos
* @param $p['fatal'] exit after displaying error
* @return always null (so users can return it::error() in error cases)
*
@@ -249,8 +249,8 @@ static function error($p = array())
$body =
($p['omitdebuginfo'] >= 2 ? "" : ($url && !$toscreen? "{$p['title']}\n\nUrl: $url\n\n" : "") .
($trace ? ($sendmail ? "" : " ") . "Trace: $trace\n\n" : "")) .
- "Host: " . getenv('HOSTNAME') . "\n\n" .
- "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (started {$t}s before)" : "") . "\n\n" . # no it::date() due to time- debug param
+ ($p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . "\n\n") .
+ ($p['omitdebuginfo'] >= 2 ? "" : "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (started {$t}s before)" : "") . "\n\n") . # no it::date() due to time- debug param
($p['body'] ? ($p['omitdebuginfo'] ? "" : "Body:\n") . trim($p['body'])."\n\n" : "");
if ($sendmail) # we're mailing: send maximum info