summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2009-04-17 14:17:12 +0000
committerUrban Müller2009-04-17 14:17:12 +0000
commit414cc575912785ef15e4a26eb002bef1d0f739bf (patch)
treec066b043d06dfbb14428384e94a86c91f62597ce /it.class
parenta6dda3c3c369eb349040b2a7eaaa2b55fdb8a931 (diff)
downloaditools-414cc575912785ef15e4a26eb002bef1d0f739bf.tar.gz
itools-414cc575912785ef15e4a26eb002bef1d0f739bf.tar.bz2
itools-414cc575912785ef15e4a26eb002bef1d0f739bf.zip
log web errs to error_log
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it.class b/it.class
index 93c37c9..13e286a 100644
--- a/it.class
+++ b/it.class
@@ -186,7 +186,6 @@ 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
-
$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
@@ -219,6 +218,9 @@ function error($p = array(), $body = null, $to = null) # $body and $to deprecate
error_log($p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . " " . (EDC('verbose') ? D($p['locals']) : ""));
}
+ if ($_SERVER['REMOTE_ADDR'])
+ error_log("it::error: " . $p['title']);
+
if (($fh = fopen("/tmp/alertdata/alert.log", "a")))
{
fputs($fh, it::date() . " " . $p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . "\n");