From 414cc575912785ef15e4a26eb002bef1d0f739bf Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 17 Apr 2009 14:17:12 +0000 Subject: log web errs to error_log --- it.class | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'it.class') 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"); -- cgit v1.2.3