From b77d0dd6c5574d9841cd5d040dfcc351a58ccb82 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Wed, 27 Aug 2008 06:58:33 -0400 Subject: [PATCH] - 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 --- program/include/bugs.inc | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/program/include/bugs.inc b/program/include/bugs.inc index 78808c3..3cd8534 100644 --- a/program/include/bugs.inc +++ b/program/include/bugs.inc @@ -84,8 +84,13 @@ $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); } -- Gitblit v1.9.1