New: Add hidden option to disable log handlers.
This commit is contained in:
parent
b3a0510407
commit
c51ff1d462
@ -117,6 +117,10 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
|
|||||||
*/
|
*/
|
||||||
public function export($content)
|
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
|
//We check the configuration to avoid showing PHP warnings
|
||||||
if (count($this->checkConfiguration())) return false;
|
if (count($this->checkConfiguration())) return false;
|
||||||
|
|
||||||
|
|||||||
@ -116,6 +116,8 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
|
|||||||
{
|
{
|
||||||
global $conf, $dolibarr_main_prod;
|
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);
|
$logfile = $this->getFilename($suffixinfilename);
|
||||||
|
|
||||||
if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+');
|
if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+');
|
||||||
|
|||||||
@ -115,6 +115,10 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
|
|||||||
*/
|
*/
|
||||||
public function export($content)
|
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
|
//We check the configuration to avoid showing PHP warnings
|
||||||
if (count($this->checkConfiguration())) return false;
|
if (count($this->checkConfiguration())) return false;
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,10 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
|||||||
*/
|
*/
|
||||||
public function export($content)
|
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 (defined("SYSLOG_FACILITY") && constant("SYSLOG_FACILITY"))
|
||||||
{
|
{
|
||||||
if (constant(constant('SYSLOG_FACILITY')))
|
if (constant(constant('SYSLOG_FACILITY')))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user