diff options
author | Urban Müller | 2009-04-17 14:17:12 +0000 |
---|---|---|
committer | Urban Müller | 2009-04-17 14:17:12 +0000 |
commit | 414cc575912785ef15e4a26eb002bef1d0f739bf (patch) | |
tree | c066b043d06dfbb14428384e94a86c91f62597ce /it.class | |
parent | a6dda3c3c369eb349040b2a7eaaa2b55fdb8a931 (diff) | |
download | itools-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.class | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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"); |