summaryrefslogtreecommitdiff
path: root/program/include/bugs.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-08-27 10:58:33 +0000
committeralecpl <alec@alec.pl>2008-08-27 10:58:33 +0000
commitb77d0dd6c5574d9841cd5d040dfcc351a58ccb82 (patch)
tree6c8e872c3d4be368f2fa631f2421d3935e71ab21 /program/include/bugs.inc
parentd5c539942e3cb4ad623a3f3f0344fc45af371981 (diff)
- added options to use syslog instead of log file (#1484850)
- added Logging & Debugging section in Installer - fixed config from $_POST for next installer steps saving - fixed and re-enabled debug_level setting in installer
Diffstat (limited to 'program/include/bugs.inc')
-rw-r--r--program/include/bugs.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/include/bugs.inc b/program/include/bugs.inc
index 78808c321..3cd853478 100644
--- a/program/include/bugs.inc
+++ b/program/include/bugs.inc
@@ -84,8 +84,13 @@ function log_bug($arg_arr)
$CONFIG['log_dir'] = INSTALL_PATH.'logs';
// try to open specific log file for writing
- if ($fp = @fopen($CONFIG['log_dir'].'/errors', 'a'))
+ if ($CONFIG['log_driver'] == 'syslog')
{
+ syslog(LOG_ERR, $log_entry);
+ }
+ else if ($fp = @fopen($CONFIG['log_dir'].'/errors', 'a'))
+ {
+ // log_driver == 'file' is the default, assumed here.
fwrite($fp, $log_entry);
fclose($fp);
}