diff --git a/htdocs/core/modules/syslog/mod_syslog_chromephp.php b/htdocs/core/modules/syslog/mod_syslog_chromephp.php index 0d838959166..e8291a2daf3 100644 --- a/htdocs/core/modules/syslog/mod_syslog_chromephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_chromephp.php @@ -117,6 +117,10 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_CHROMEPHP)) return; // Global option to disable output of this handler + //We check the configuration to avoid showing PHP warnings if (count($this->checkConfiguration())) return false; diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index 3a03d20ed00..ddb30df4e45 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -116,6 +116,8 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface { global $conf, $dolibarr_main_prod; + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_FILE)) return; // Global option to disable output of this handler + $logfile = $this->getFilename($suffixinfilename); if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+'); diff --git a/htdocs/core/modules/syslog/mod_syslog_firephp.php b/htdocs/core/modules/syslog/mod_syslog_firephp.php index 311c43ca207..4a95a89862f 100644 --- a/htdocs/core/modules/syslog/mod_syslog_firephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_firephp.php @@ -115,6 +115,10 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_FIREPHP)) return; // Global option to disable output of this handler + //We check the configuration to avoid showing PHP warnings if (count($this->checkConfiguration())) return false; diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php index 09353dc5119..9b0d854e2e8 100644 --- a/htdocs/core/modules/syslog/mod_syslog_syslog.php +++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php @@ -108,6 +108,10 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + + if (! empty($conf->global->MAIN_SYSLOG_DISABLE_SYSLOG)) return; // Global option to disable output of this handler + if (defined("SYSLOG_FACILITY") && constant("SYSLOG_FACILITY")) { if (constant(constant('SYSLOG_FACILITY')))