diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-08-27 10:58:33 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-08-27 10:58:33 +0000 |
| commit | 1f08b4d3e99d7955cf62cdaac0123de79b1acdb2 (patch) | |
| tree | add66a586aa27931f1c5bb4a36f8b6eaa743a960 /roundcubemail/program/include/bugs.inc | |
| parent | e90425d8c5a3cd3c03cdd3a8252d78bc516cebf5 (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
git-svn-id: https://svn.roundcube.net/trunk@1683 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/bugs.inc')
| -rw-r--r-- | roundcubemail/program/include/bugs.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/program/include/bugs.inc b/roundcubemail/program/include/bugs.inc index 78808c321..3cd853478 100644 --- a/roundcubemail/program/include/bugs.inc +++ b/roundcubemail/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); } |
