From 7d01ea7fc32ea504a464bf9837dba266239e0120 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 6 Nov 2012 19:42:03 +0100 Subject: [PATCH] Fix: Do not break dolibarr usage if log fails --- htdocs/core/modules/syslog/mod_syslog_file.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index 4fbc9a39c4d..6920d35bb48 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -99,7 +99,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface if (!$filefd && ! defined("SYSLOG_FILE_NO_ERROR")) { - throw new Exception('Failed to open log file '.$logfile); + // Do not break dolibarr usage if log fails + //throw new Exception('Failed to open log file '.basename($logfile)); + print 'Failed to open log file '.basename($logfile); } $logLevels = array(