New: Add hidden option to disable log handlers.

This commit is contained in:
Laurent Destailleur 2013-10-30 19:08:41 +01:00
parent b3a0510407
commit c51ff1d462
4 changed files with 14 additions and 0 deletions

View File

@ -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;

View File

@ -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+');

View File

@ -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;

View File

@ -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')))